Package org.docx4j.utils
Class StaXInputFactoryUtils
java.lang.Object
org.docx4j.utils.StaXInputFactoryUtils
This code comes from https://github.com/apache/tika/blob/main/tika-core/src/main/java/org/apache/tika/utils/XMLReaderUtils.java
at https://github.com/apache/tika/commit/16de8cc0efcdb21785a448d1c2dbd8a1c925dfc2
It is potentially more comprehensive XXE hardening than what we had previously.
- Since:
- 11.5.6
- Author:
- jharrop
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected static org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic XMLInputFactoryReturns the StAX input factory specified in this parsing context.
-
Field Details
-
log
protected static org.slf4j.Logger log -
DEFAULT_MAX_ENTITY_EXPANSIONS
public static final int DEFAULT_MAX_ENTITY_EXPANSIONS- See Also:
-
-
Constructor Details
-
StaXInputFactoryUtils
public StaXInputFactoryUtils()
-
-
Method Details
-
getXMLInputFactory
Returns the StAX input factory specified in this parsing context. If a factory is not explicitly specified, then a default factory instance is created and returned. The default factory instance is configured to be namespace-aware and to apply reasonable security precautions.- Returns:
- StAX input factory
- Since:
- Apache Tika 1.13
-