Skip to content

Commit

Permalink
Allow SP config force signature validation
Browse files Browse the repository at this point in the history
  • Loading branch information
zogoo committed Jul 24, 2024
1 parent 3e58ea2 commit db81230
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/saml_idp/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,8 @@ def valid_signature?
# Force signatures for logout requests because there is no other protection against a cross-site DoS.
# Validate signature when metadata specify AuthnRequest should be signed
metadata = service_provider.current_metadata
if logout_request? || authn_request? && metadata.respond_to?(:sign_authn_request?) && metadata.sign_authn_request?
document.valid_signature?(service_provider.cert, service_provider.fingerprint)
else
true
end
require_signature = logout_request? || authn_request? && metadata.respond_to?(:sign_authn_request?) && metadata.sign_authn_request?
service_provider.validate_signature?(document, require_signature)
end

def valid_external_signature?
Expand Down

0 comments on commit db81230

Please sign in to comment.