-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
HADOOP-18575: make transformer factory more lenient #5224
HADOOP-18575: make transformer factory more lenient #5224
Conversation
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.
Thanks @pjfanning for the patch, the approach looks good to me.
💔 -1 overall
This message was automatically generated. |
c319bcb
to
df33527
Compare
💔 -1 overall
This message was automatically generated. |
LGTM. The java doc issue has nothing to do with the change. |
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/XMLUtils.java
Outdated
Show resolved
Hide resolved
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
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.
needs a test.
if bestEffortSet was made package private then tests could go in to
- verify a known attr is set with result true
- unknown attr is swallowed and returned false.
we need this as the xml parsers we probably work with will take the attributes production code generates
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/XMLUtils.java
Outdated
Show resolved
Hide resolved
cad05dd
to
b381856
Compare
added basic test coverage |
💔 -1 overall
This message was automatically generated. |
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.
LGTM
+1
Due diligence followup to HADOOP-18469. Add secure XML parser factories to XMLUtils (#4940) Contributed by P J Fanning
Due diligence followup to HADOOP-18469. Add secure XML parser factories to XMLUtils (#4940) Contributed by P J Fanning
Due diligence followup to HADOOP-18469. Add secure XML parser factories to XMLUtils (apache#4940) Contributed by P J Fanning
… + followups This change is a squash of below three patches from upstream: 1. HADOOP-18469. Add secure XML parser factories to XMLUtils (apache#4940) Add to XMLUtils a set of methods to create secure XML Parsers/transformers, locking down DTD, schema, XXE exposure. Use these wherever XML parsers are created. Contributed by PJ Fanning (cherry-picked from 8336b91) 2. HADOOP-18575. Make XML transformer factory more lenient (apache#5224) Due diligence followup to HADOOP-18469. Add secure XML parser factories to XMLUtils (apache#4940) Contributed by P J Fanning (cherry-picked from 6a07b5d) 3. HADOOP-18575: followup: try to avoid repeatedly hitting exceptions when transformer factories do not support attributes (apache#5253) Part of HADOOP-18469 and the hardening of XML/XSL parsers. Followup to the main HADOOP-18575 patch, to improve performance when working with xml/xsl engines which don't support the relevant attributes. Include this change when backporting. Contributed by PJ Fanning. (cherry-picked from d81d983) Change-Id: Ic519987c1f07d286fb3811b961a406bd280f039a
Description of PR
Relates to https://issues.apache.org/jira/browse/HADOOP-18469 and issues raised on 14 Dec 2022. Raised https://issues.apache.org/jira/browse/HADOOP-18575
How was this patch tested?
CI build
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?