Class EnforcedResolverFragment
java.lang.Object
eu.europa.esig.dss.xades.EnforcedResolverFragment
This class tests the xpath expression against injection.
See https://www.owasp.org/index.php/XPATH_Injection_Java.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckValueForXpathInjection(String xpathString) This method tests the xpath expression against injectionbooleanengineCanResolveURI(org.apache.xml.security.utils.resolver.ResourceResolverContext context) org.apache.xml.security.signature.XMLSignatureInputengineResolveURI(org.apache.xml.security.utils.resolver.ResourceResolverContext arg0)
-
Constructor Details
-
EnforcedResolverFragment
public EnforcedResolverFragment()Default constructor
-
-
Method Details
-
engineCanResolveURI
public boolean engineCanResolveURI(org.apache.xml.security.utils.resolver.ResourceResolverContext context) -
checkValueForXpathInjection
This method tests the xpath expression against injection- Parameters:
xpathString- the xpath expression to be tested- Returns:
- false if the xpath contains forbidden character or if the xpath cannot be decoded
-
engineResolveURI
public org.apache.xml.security.signature.XMLSignatureInput engineResolveURI(org.apache.xml.security.utils.resolver.ResourceResolverContext arg0) throws org.apache.xml.security.utils.resolver.ResourceResolverException - Throws:
org.apache.xml.security.utils.resolver.ResourceResolverException
-