Bug 45475 - XMLSignature::getKeyInfo method modifies document
XMLSignature::getKeyInfo method modifies document
Status: RESOLVED FIXED
Product: Security - Now in JIRA
Classification: Unclassified
Component: Signature
unspecified
PC Windows XP
: P2 critical
: ---
Assigned To: XML Security Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-07-24 04:37 UTC by Gill Bates
Modified: 2008-09-15 11:34 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gill Bates 2008-07-24 04:37:01 UTC
The org.w3c.com.document that is assigned to an XMLSignature object through the document's signature element

Document doc=..;
Element sigElement = doc.get...;

XMLSignature signature = new XMLSignature(sigElement, null);
				 
signature.getKeyInfo();

-> original document is modified

That seems to happen, if no Key Information is present in the signature Element.

Result: document is modified, future verification fails (e.g. with another signature Element).

Happens with xml-sec 1.4.2, java version

xml-sec 1.4.0 did not contain this bug.
Comment 1 sean.mullan 2008-09-15 11:34:56 UTC
Fixed in trunk/main branch.