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

SAXHelper uses invalid parser feature keys for disabling entity expansion #165

Open
kennymacleod opened this issue Jun 22, 2023 · 1 comment · May be fixed by #173
Open

SAXHelper uses invalid parser feature keys for disabling entity expansion #165

kennymacleod opened this issue Jun 22, 2023 · 1 comment · May be fixed by #173

Comments

@kennymacleod
Copy link

The createXMLReader of SAXHelper specifies a bunch of feature keys to make the XMLReader safe by default. However, two of the feature keys are incorrect.

Specifically, these two:

    SAXHelper.setParserFeature(reader, "http://xml.org/sax/properties/external-general-entities", false);
    SAXHelper.setParserFeature(reader, "http://xml.org/sax/properties/external-parameter-entities", false);

The URI prefix for these should be http://xml.org/sax/features, not http://xml.org/sax/properties.

The other keys in the method are OK.

This has likely gone unnoticed because the setParserFeature helper method catch and ignores SAXNotRecognizedException

@carlosame
Copy link
Contributor

Known issue, see #51 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants