Remove namespace-breaking reserialization of signature from example in README#105
Merged
bjrmatos merged 1 commit intonode-saml:masterfrom Apr 11, 2016
brownstein:fix-verification-doc
Merged
Remove namespace-breaking reserialization of signature from example in README#105bjrmatos merged 1 commit intonode-saml:masterfrom brownstein:fix-verification-doc
bjrmatos merged 1 commit intonode-saml:masterfrom
brownstein:fix-verification-doc
Conversation
Contributor
|
thnk you! you're right |
Contributor
|
@brownstein - sorry to hear it wasted you a few days to chase this (been there...) but so great that you came back with this PR! |
cmordue
added a commit
to cmordue/saml20
that referenced
this pull request
Dec 13, 2017
…efined on Signature node. Remove namespace-breaking reserialization of signature which used to be in the documented example from xml-crypto but was removed due to this bug See: node-saml/xml-crypto#105
This was referenced Dec 13, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a fix for the example signature validation documentation; the toString() call on the signature node turns out to be harmful, as it removes namespace metadata which would otherwise propagate from the parent document. In situations where the namespace is
ds, this works out ok (as ds is provided as a default) but when using other strings for this namespace the example boilerplate fails.In the example below, the definition of
dsigwould be undefined in a toString-orphaned signature, and the canonicalization algorithm would resolve the url as an empty string -- changing the underlying canonical text and causing the SignatureValue verification to fail.PR fixes this in the example, which realistically will get used as boilerplate in many integrations of this library. Having just spent three days chasing down the cause of one of our SAML integration failures, I think its a useful change.