Class StaXInputFactoryUtils

java.lang.Object
org.docx4j.utils.StaXInputFactoryUtils

public class StaXInputFactoryUtils extends Object
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 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

      public static XMLInputFactory 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