-
Notifications
You must be signed in to change notification settings - Fork 183
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
XMLSecurityDSig->validateReference() Null Exception #108
Comments
As mentioned in lightSAML/SpBundle#15 (comment) ... Think the solution should be determined once we're able to reproduce the error... So, please provide how to reproduce the error, with all needed data. Maybe the error is in lightsaml and not here in xmlseclibs... |
This is happening if one same instance of signature is verified for the second time (with different key). Problem is dom is modified and implementation does not expect side effects itself have made. Have tried suggested fix by @ermalmino and it prevents for erroring on the second verificaction. |
Made fix in #113 ... waiting to be merged |
allow validation multiple times #108
Hello,
We have been using your library as part of LightSaml and with a particular Identity Provider's response there was a Null pointer exception occuring inside XMLSecurityDSig->validateReference() function,
more specifically at this line:
if (! $docElem->isSameNode($this->sigNode)) {
$this->sigNode->parentNode->removeChild($this->sigNode);
}
Aparently $this->sigNode->parentNode is null and a simple check was enough to solve the problem for me, like this:
if (! $docElem->isSameNode($this->sigNode)) {
if($this->sigNode->parentNode != null) {
$this->sigNode->parentNode->removeChild($this->sigNode);
}
}
I would appreciate if you could fix this.
Let me know if I can provide more info on the matter.
Thank you for your great library,
Ermal.
The text was updated successfully, but these errors were encountered: