ASF Bugzilla – Attachment 23749 Details for
Bug 42986
The </#document> node inserted at the end of SOAPEnvelop
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
A patch for this issue.
xml-sec-42986.patch (text/plain), 5.15 KB, created by
coheigea
on 2009-06-03 06:56:24 UTC
(
hide
)
Description:
A patch for this issue.
Filename:
MIME Type:
Creator:
coheigea
Created:
2009-06-03 06:56:24 UTC
Size:
5.15 KB
patch
obsolete
>Index: src/org/apache/xml/security/utils/IdResolver.java >=================================================================== >--- src/org/apache/xml/security/utils/IdResolver.java (revision 781353) >+++ src/org/apache/xml/security/utils/IdResolver.java (working copy) >@@ -219,7 +219,7 @@ > } while (sibling==null && parentNode!=null) { > sibling=parentNode.getNextSibling(); > parentNode=parentNode.getParentNode(); >- if (!(parentNode instanceof Element)) { >+ if (parentNode != null && Node.ELEMENT_NODE != parentNode.getNodeType()) { > parentNode=null; > } > } >Index: src/org/apache/xml/security/Init.java >=================================================================== >--- src/org/apache/xml/security/Init.java (revision 781353) >+++ src/org/apache/xml/security/Init.java (working copy) >@@ -145,7 +145,7 @@ > } > } > for (Node el=config.getFirstChild();el!=null;el=el.getNextSibling()) { >- if (!(el instanceof Element)) { >+ if (el == null || Node.ELEMENT_NODE != el.getNodeType()) { > continue; > } > String tag=el.getLocalName(); >Index: src/org/apache/xml/security/c14n/implementations/CanonicalizerBase.java >=================================================================== >--- src/org/apache/xml/security/c14n/implementations/CanonicalizerBase.java (revision 781353) >+++ src/org/apache/xml/security/c14n/implementations/CanonicalizerBase.java (working copy) >@@ -198,7 +198,7 @@ > try { > NameSpaceSymbTable ns=new NameSpaceSymbTable(); > int nodeLevel=NODE_BEFORE_DOCUMENT_ELEMENT; >- if (rootNode instanceof Element) { >+ if (rootNode != null && Node.ELEMENT_NODE == rootNode.getNodeType()) { > //Fills the nssymbtable with the definitions of the parent of the root subnode > getParentNameSpaces((Element)rootNode,ns); > nodeLevel=NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT; >@@ -327,8 +327,8 @@ > if (parentNode==endnode) > return; > sibling=parentNode.getNextSibling(); >- parentNode=parentNode.getParentNode(); >- if (!(parentNode instanceof Element)) { >+ parentNode=parentNode.getParentNode(); >+ if (parentNode == null || Node.ELEMENT_NODE != parentNode.getNodeType()) { > documentLevel=NODE_AFTER_DOCUMENT_ELEMENT; > parentNode=null; > } >@@ -384,7 +384,7 @@ > return; > boolean currentNodeIsVisible = false; > NameSpaceSymbTable ns=new NameSpaceSymbTable(); >- if (currentNode instanceof Element) >+ if (currentNode != null && Node.ELEMENT_NODE == currentNode.getNodeType()) > getParentNameSpaces((Element)currentNode,ns); > Node sibling=null; > Node parentNode=null; >@@ -505,7 +505,7 @@ > return; > sibling=parentNode.getNextSibling(); > parentNode=parentNode.getParentNode(); >- if (!(parentNode instanceof Element)) { >+ if (parentNode == null || Node.ELEMENT_NODE != parentNode.getNodeType()) { > parentNode=null; > documentLevel=NODE_AFTER_DOCUMENT_ELEMENT; > } >@@ -587,7 +587,7 @@ > final void getParentNameSpaces(Element el,NameSpaceSymbTable ns) { > List parents=new ArrayList(10); > Node n1=el.getParentNode(); >- if (!(n1 instanceof Element)) { >+ if (n1 == null || Node.ELEMENT_NODE != n1.getNodeType()) { > return; > } > //Obtain all the parents of the elemnt >@@ -595,7 +595,7 @@ > while (parent!=null) { > parents.add(parent); > Node n=parent.getParentNode(); >- if (!(n instanceof Element )) { >+ if (n == null || Node.ELEMENT_NODE != n.getNodeType()) { > break; > } > parent=(Element)n; >Index: src/org/apache/xml/security/encryption/XMLCipher.java >=================================================================== >--- src/org/apache/xml/security/encryption/XMLCipher.java (revision 781353) >+++ src/org/apache/xml/security/encryption/XMLCipher.java (working copy) >@@ -1392,7 +1392,7 @@ > // The de-serialiser returns a fragment whose children we need to > // take on. > >- if (sourceParent instanceof Document) { >+ if (sourceParent != null && Node.DOCUMENT_NODE == sourceParent.getNodeType()) { > > // If this is a content decryption, this may have problems > >Index: src/org/apache/xml/security/keys/keyresolver/implementations/RetrievalMethodResolver.java >=================================================================== >--- src/org/apache/xml/security/keys/keyresolver/implementations/RetrievalMethodResolver.java (revision 781353) >+++ src/org/apache/xml/security/keys/keyresolver/implementations/RetrievalMethodResolver.java (working copy) >@@ -279,7 +279,7 @@ > Element e=null; > while (it.hasNext()) { > Node currentNode=(Node)it.next(); >- if (currentNode instanceof Element) { >+ if (currentNode != null && Node.ELEMENT_NODE == currentNode.getNodeType()) { > e=(Element)currentNode; > break; > } >@@ -291,7 +291,7 @@ > do { > parents.add(e); > Node n=e.getParentNode(); >- if (!(n instanceof Element )) { >+ if (n == null || Node.ELEMENT_NODE != n.getNodeType()) { > break; > } > e=(Element)n;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 42986
:
22545
| 23749