Skip to content
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

NO-ISSUE: Fix load external schemas vulnerability #3192

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ public Object read(final InputSource in) throws SAXException,
try {
factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does not exist so there is no point to set it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my bad.

http://apache.org/xml/features/nonvalidating/load-external-dtd   http://apache.org/xml/features/nonvalidating/load-external-dtd        
  http://apache.org/xml/features/nonvalidating/load-external-dtd  
     
  True: Load the external DTD. False: Ignore the external DTD completely. Default: true Note: This feature is always on when validation is on. See: http://xml.org/sax/features/validation See: http://apache.org/xml/features/nonvalidating/load-dtd-grammar True: Load the external DTD. False: Ignore the external DTD completely. Default:
True: Load the external DTD.
False: Ignore the external DTD completely.
Default: true
Note: This feature is always on when validation is on.
See: http://xml.org/sax/features/validation
See: http://apache.org/xml/features/nonvalidating/load-dtd-grammar
it does exists

http://apache.org/xml/features/nonvalidating/load-external-dtd

True: Load the external DTD.
False: Ignore the external DTD completely.
Default: true
Note: This feature is always on when validation is on.
See: http://xml.org/sax/features/validation
See: http://apache.org/xml/features/nonvalidating/load-dtd-grammar


} catch (ParserConfigurationException e) {
logger.warn("Unable to set parser features due to {}", e.getMessage());
Expand Down
Loading