Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix signature check if response contains attributes with windows style endings #255

Closed
wants to merge 1 commit into from

Conversation

AG-Teammate
Copy link

This PR fixes an issue with signature check if SAML Response has \r\n style endings (for example in attributes). The signature check should run against raw decoded XML.

@mcab
Copy link
Member

mcab commented Oct 15, 2022

From my reading, yes, it would be more proper to validate the signature against _xml (original input) rather than xml (\r\n replaced with \n).

But, sig is from xmlcrypto, which before 0.8.0, requires it to be normalized with \n: node-saml/xml-crypto@17f75c5#diff-5dfe38baf287dcf756a17c2dd63483781b53bf4b669e10efdd01e74bcd8e780aL69.

Changing this to the original would break parsing. Updating xmlcrypto would fix this. Will keep track in #245.

Please comment if this is not the case.

@mcab mcab closed this Oct 15, 2022
@AG-Teammate
Copy link
Author

@mcab We've had issues with SAML Assertions coming from simpleSamlPHP with windows-style line breaks in attributes. Running patched version in production.

With that said, we'll try 4.0.0 in the next few weeks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants