Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/controllers/saml_idp_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ def capture_analytics
end

def matching_cert_serial
return if saml_request_service_provider.blank?

saml_request.matching_cert&.serial&.to_s
rescue SamlIdp::XMLSecurity::SignedDocument::ValidationError
nil
Expand Down
3 changes: 2 additions & 1 deletion spec/controllers/saml_idp_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2070,6 +2070,7 @@ def name_id_version(format_urn)
end

before do
allow_any_instance_of(Saml::XML::Document).to receive(:signed?).and_return true
IdentityLinker.new(user, service_provider).link_identity
user.identities.last.update!(verified_attributes: ['email'])
expect(CGI).to receive(:unescape).and_return deflated_encoded_req
Expand All @@ -2087,7 +2088,7 @@ def name_id_version(format_urn)
requested_nameid_format: 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',
authn_context: [],
authn_context_comparison: 'exact',
request_signed: false,
request_signed: true,
requested_ial: 'none',
endpoint: "/api/saml/auth#{path_year}",
idv: false,
Expand Down