Skip to content

Commit

Permalink
Change error "The SPNameQualifier value mistmatch the SP entityID val…
Browse files Browse the repository at this point in the history
…ue." to "SPNameQualifier value does not match the SP entityID value."
  • Loading branch information
johnnyshields committed Jul 17, 2024
1 parent 626140b commit be53db1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* [#690](https://github.com/SAML-Toolkits/ruby-saml/pull/690) Remove deprecated `settings.security[:embed_sign]` parameter.
* [#697](https://github.com/SAML-Toolkits/ruby-saml/pull/697) Add deprecation for various parameters in `RubySaml::Settings`.
* [#709](https://github.com/SAML-Toolkits/ruby-saml/pull/709) Allow passing in `Net::HTTP` `:open_timeout`, `:read_timeout`, and `:max_retries` settings to `IdpMetadataParser#parse_remote`.
* [#715](https://github.com/SAML-Toolkits/ruby-saml/pull/715) Fix typo in error when SPNameQualifier value does not match the SP entityID.

### 1.17.0
* [#687](https://github.com/SAML-Toolkits/ruby-saml/pull/687) Add CI coverage for Ruby 3.3 and Windows.
Expand Down
2 changes: 1 addition & 1 deletion lib/ruby_saml/response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ def validate_name_id
end

if !(settings.sp_entity_id.nil? || settings.sp_entity_id.empty? || name_id_spnamequalifier.nil? || name_id_spnamequalifier.empty?) && (name_id_spnamequalifier != settings.sp_entity_id)
return append_error("The SPNameQualifier value mistmatch the SP entityID value.")
return append_error('SPNameQualifier value does not match the SP entityID value.')
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/response_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ def generate_audience_error(expected, actual)
settings.sp_entity_id = 'sp_entity_id'
response_wrong_spnamequalifier.settings = settings
assert !response_wrong_spnamequalifier.send(:validate_name_id)
assert_includes response_wrong_spnamequalifier.errors, "The SPNameQualifier value mistmatch the SP entityID value."
assert_includes response_wrong_spnamequalifier.errors, 'SPNameQualifier value does not match the SP entityID value.'
end

it "return true when no nameid element but not required by settings" do
Expand Down

0 comments on commit be53db1

Please sign in to comment.