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

SAML1 Signature Validation fails #23

Open
williamthom-as opened this issue Jul 22, 2016 · 0 comments
Open

SAML1 Signature Validation fails #23

williamthom-as opened this issue Jul 22, 2016 · 0 comments

Comments

@williamthom-as
Copy link

Using ADFS3 as the IDP, the signature and digests fails validation by mismatched hashes.

Not sure if there is a configuration issue on my end, but from what I can see the problem is due to carriage returns, tabs and whitespace being left in the canonicalized string.

Would be great to see this fixed if indeed it is a problem (not sure if you support ADFS3.0), the fix I implemented merely stripped out undesired excess characters which caused the digests to mismatch, have no tested against other IdP's.

Original:
canon_hashed_element = canoner.canonicalize(hashed_element)
...
canon_string = canoner.canonicalize(signed_info_element)

Fix:
canon_hashed_element = canoner.canonicalize(hashed_element).gsub(/\n\t/, " ").gsub(/>\s*</, "><")
...
canon_string = canoner.canonicalize(signed_info_element).gsub(/\n\t/, " ").gsub(/>\s*</, "><")

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

No branches or pull requests

1 participant