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

Check secure feature processing enabled #204

Merged
merged 2 commits into from
Apr 10, 2018

Conversation

ashawley
Copy link
Member

@ashawley ashawley commented Apr 6, 2018

With respect to #177, it appears that 3 of the 8 security features in JAXP/SAX/Xerces are already enabled by default all the way back to JDK 6. They are:

  • http://javax.xml.XMLConstants/feature/secure-processing is already enabled
  • isXIncludeAware is already disabled
  • isNamespaceAware is already disabled

These 5 are not enabled:

http://xml.org/sax/features/external-general-entities
http://apache.org/xml/features/nonvalidating/load-external-dtd
http://apache.org/xml/features/disallow-doctype-decl
http://xml.org/sax/features/external-parameter-entities
http://xml.org/sax/features/resolve-dtd-uris

@ashawley
Copy link
Member Author

ashawley commented Apr 6, 2018

Tests show that the default settings enabled are not the desired ones.

[error] Test scala.xml.XMLTestJVM.issue17ExternalParameterEntities failed
[error] Test scala.xml.XMLTestJVM.issue17ExternalGeneralEntities failed
[error] Test scala.xml.XMLTestJVM.issue17DisallowDoctypeDecl failed
[error] Test scala.xml.XMLTestJVM.issue17ResolveDtdUris failed
[error] Test scala.xml.XMLTestJVM.issue17LoadExternalDtd failed

@ashawley ashawley force-pushed the secure-parsing-tests branch from 82f8cb6 to 47cde98 Compare April 10, 2018 14:32
@ashawley ashawley merged commit 10fa231 into scala:master Apr 10, 2018
@ashawley ashawley deleted the secure-parsing-tests branch April 10, 2018 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant