-
Notifications
You must be signed in to change notification settings - Fork 67
[SANTUARIO-576] Fix saml validation with saaj 1.4+ #453
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
Conversation
Signature element was not removed due to type mismatch
coheigea
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work with just currentNode.isSameNode(excludeNode) ?
|
Sadly not, it does not work in my specific case with just currentNode.isSameNode(excludeNode) |
|
It's a bit strange - do you have a test case where isSameNode only works one way? |
|
I sent a test case per mail on 13th January. |
seanjmullan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look ok, although it may be more optimal to first check if the references are equal and if not then fallback to calling isSameNode. WDYT?
|
I changed the code to check the references first - should be better like this, i agree. |
* [SANTUARIO-576] Fix saml validation with saaj 1.4 Signature element was not removed due to type mismatch * [SANTUARIO-576] Check for reference equality first --------- Co-authored-by: Lukas Fabian <lukas.fabian@svc.co.at>
When using SAAJ versions from 1.4 onwards, the signature element of the request was not removed due to type mismatch. This led to failed validations because the digest was wrongly calculated.
With this fix the excludeNode will be excluded even if the currentNode and excludeNode differ in type (e.g. com.sun.xml.messaging.saaj.soap.impl.ElementImpl vs. com.sun.org.apache.xerces.internal.dom.ElementNSImpl).