Harden XML parsing via commons-secure-xml - #673
Merged
coheigea merged 6 commits intoSep 14, 2026
Merged
Conversation
This reuses Apache Commons Secure XML.
garydgregory
marked this pull request as ready for review
September 6, 2026 17:26
ppkarwasz
reviewed
Sep 7, 2026
ppkarwasz
reviewed
Sep 7, 2026
Comment on lines
146
to
153
Member
There was a problem hiding this comment.
These hardenings are no longer necessary, and can be removed.
ppkarwasz
reviewed
Sep 7, 2026
| private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(SOAPUtil.class); | ||
|
|
||
| private static DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); | ||
| private static DocumentBuilderFactory factory = SecureDocumentBuilderFactory.newInstance(); |
Member
There was a problem hiding this comment.
Using newNSInstance() here allows to remove the setNamespaceAware on line 51.
…rberos/KerberosTest.java Co-authored-by: Piotr P. Karwasz <piotr@github.copernik.eu>
Remove now redundant code.
ppkarwasz
approved these changes
Sep 13, 2026
ppkarwasz
left a comment
Member
There was a problem hiding this comment.
LGTM!
I found two remaining lines that could be simplified:
ppkarwasz
approved these changes
Sep 13, 2026
coheigea
approved these changes
Sep 14, 2026
Contributor
|
Thanks for the contribution! |
coheigea
pushed a commit
that referenced
this pull request
Sep 14, 2026
* Harden XML parsing via commons-secure-xml This reuses Apache Commons Secure XML. * Update integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java Co-authored-by: Piotr P. Karwasz <piotr@github.copernik.eu> * Harden XML parsing via commons-secure-xml Remove now redundant code. * Use newNSInstance(). * Harden XML parsing via commons-secure-xml * Sentence starts with a capital letter. --------- Co-authored-by: Piotr P. Karwasz <piotr@github.copernik.eu>
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 reuses Apache Commons Secure XML.