- java.lang.Object
-
- io.github.pixee.security.XMLInputFactorySecurity
-
public final class XMLInputFactorySecurity extends java.lang.Object
This type exposes helper methods that will help defend against XXE attacks inXMLInputFactory
.For more on XXE:
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static javax.xml.stream.XMLInputFactory
hardenFactory(javax.xml.stream.XMLInputFactory factory)
Harden theXMLInputFactory
against external entity attacksstatic javax.xml.stream.XMLInputFactory
hardenFactory(javax.xml.stream.XMLInputFactory factory, java.util.Set<XMLRestrictions> restrictions)
Harden theXMLInputFactory
against XML-based attacks with the given restrictions.
-
-
-
Method Detail
-
hardenFactory
public static javax.xml.stream.XMLInputFactory hardenFactory(javax.xml.stream.XMLInputFactory factory)
Harden theXMLInputFactory
against external entity attacks
-
hardenFactory
public static javax.xml.stream.XMLInputFactory hardenFactory(javax.xml.stream.XMLInputFactory factory, java.util.Set<XMLRestrictions> restrictions)
Harden theXMLInputFactory
against XML-based attacks with the given restrictions.
-
-