Class SecuredConf
java.lang.Object
org.tuckey.web.filters.urlrewrite.Conf
org.craftercms.engine.url.rewrite.SecuredConf
public final class SecuredConf
extends org.tuckey.web.filters.urlrewrite.Conf
Tuckey
Conf that loads URL rewrite XML without resolving external entities.
Shipped site configuration declares the Tuckey DTD, so rejecting every DOCTYPE would
stop those sites from loading. This parser accepts only the DTD public ids packaged in
urlrewritefilter and reads those DTDs from that jar. Internal subsets and any other
entity are rejected. Conf.loadDom(InputStream) is not used.
Conf's constructor calls loadDom before any instance field on this
class could be initialized. Parser settings and the DTD allowlist are static.
Parse failures are written to Conf.getErrors(), which Conf initializes
before that call. loadDom must not read instance fields.
-
Field Summary
Fields inherited from class org.tuckey.web.filters.urlrewrite.Conf
decodeUsing, defaultMatchType, useContext, useQueryString -
Constructor Summary
ConstructorsConstructorDescriptionSecuredConf(jakarta.servlet.ServletContext context, InputStream inputStream, String fileName, String systemId, boolean modRewriteStyleConf) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidloadDom(InputStream inputStream) Replaces Tuckey's parser.Methods inherited from class org.tuckey.web.filters.urlrewrite.Conf
addOutboundRule, addRule, destroy, getCatchElems, getDecodeUsing, getDefaultMatchType, getErrors, getFileName, getLoadedDate, getOutboundRules, getRules, initialise, isDecodeUsingCustomCharsetRequired, isDecodeUsingEncodingHeader, isEngineEnabled, isLoadedFromFile, isOk, isUseContext, isUseQueryString, loadModRewriteStyle, processConfDoc, setDecodeUsing, setDefaultMatchType, setEngineEnabled, setUseContext, setUseQueryString
-
Constructor Details
-
SecuredConf
public SecuredConf(jakarta.servlet.ServletContext context, InputStream inputStream, String fileName, String systemId, boolean modRewriteStyleConf)
-
-
Method Details
-
loadDom
Replaces Tuckey's parser. A secure parser cannot be configured by callingsuper.loadDom: that method builds its own factory and resolver.Called from the superclass constructor. Uses only static state.
- Overrides:
loadDomin classorg.tuckey.web.filters.urlrewrite.Conf
-