-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
SAXNotRecognizedException #42
Comments
It appears that the implementation of the SAX parser doesn't support disabling DTDs, which prevents XML entity attacks. If possible, I'd suggest switching to a SAX parser that supports the feature. |
I am using implementation 'javax.xml.stream:stax-api:1.0-2' and it's works fine with the old version of your library |
Xerces should support the feature: https://xerces.apache.org/xerces2-j/features.html
The feature avoids a security vulnerability, so I would be reluctant to ignore errors from enabling the feature. |
Please help to fix for Android, there is an exception
Caused by: org.xml.sax.SAXNotRecognizedException: http://apache.org/xml/features/disallow-doctype-decl
at org.apache.harmony.xml.parsers.SAXParserFactoryImpl.setFeature(SAXParserFactoryImpl.java:93)
java.lang.RuntimeException: org.xml.sax.SAXNotRecognizedException: http://apache.org/xml/features/disallow-doctype-decl
at org.zwobble.mammoth.internal.xml.parsing.SimpleSax.parseInputSource(SimpleSax.java:67)
at org.zwobble.mammoth.internal.xml.parsing.SimpleSax.parseStream(SimpleSax.java:24)
at org.zwobble.mammoth.internal.xml.parsing.XmlParser.parseStream(XmlParser.java:24)
at org.zwobble.mammoth.internal.docx.OfficeXml.parseXml(OfficeXml.java:38)
The text was updated successfully, but these errors were encountered: