SchemaFactory features not recognized
Posted: Wed Dec 06, 2023 6:12 pm
Hello,
We use Author Web 26.0.
In our framework, we have defined an operation based on an XML configuration file. This configuration file is validated via an XSD schema.
So we have these lines in our code:
SchemaFactory is implemented in the oxygen-patched-xerces library.
In order to meet security requirements, we want to add these properties so as not to be vulnerable to XXE attacks:
However, these properties are not recognized, as oxygen-patched-xerces seems to embed jaxp 1.4, which does not yet include these properties.
These properties have been introduced in jaxp 1.5
Is there any particular reason why oxygen-patched-xerces still depends on jaxp 1.4?
Is there a solution to my problem? If I pull in another version of xerces to meet my needs, won't that conflict with the Oxygen libs?
Thank you,
Johann
We use Author Web 26.0.
In our framework, we have defined an operation based on an XML configuration file. This configuration file is validated via an XSD schema.
So we have these lines in our code:
Code: Select all
SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Validator validator = schema.newValidator();
In order to meet security requirements, we want to add these properties so as not to be vulnerable to XXE attacks:
Code: Select all
SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
factory.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, "");
factory.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
These properties have been introduced in jaxp 1.5
Is there any particular reason why oxygen-patched-xerces still depends on jaxp 1.4?
Is there a solution to my problem? If I pull in another version of xerces to meet my needs, won't that conflict with the Oxygen libs?
Thank you,
Johann