Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Use certificate fingerprint as a fallback only

Jan Sandbrink4325c394409b
diff --git a/modules/auth_saml/app/models/saml/provider/hash_builder.rb b/modules/auth_saml/app/models/saml/provider/hash_builder.rb
index 5cbf13df8d5..2ef6bbf7fe0 100644
--- a/modules/auth_saml/app/models/saml/provider/hash_builder.rb
+++ b/modules/auth_saml/app/models/saml/provider/hash_builder.rb
@@ -26,22 +26,22 @@ module Saml
end
def idp_cert_options_hash
- if idp_cert_fingerprint.present?
- return { idp_cert_fingerprint: }
- end
-
if idp_cert.present?
certificates = loaded_idp_certificates.map(&:to_pem)
if certificates.count > 1
- {
+ return {
idp_cert_multi: {
signing: certificates,
encryption: certificates
}
}
else
- { idp_cert: certificates.first }
+ return { idp_cert: certificates.first }
end
+ end
+
+ if idp_cert_fingerprint.present?
+ { idp_cert_fingerprint: }
else
{}
end