Interface XSSFilter.XSSFilterConfig
-
- All Known Implementing Classes:
DefaultXSSFilterConfig
- Enclosing class:
- XSSFilter
public static interface XSSFilter.XSSFilterConfigInterface to inject configuration parameters intoXSSFilterwithout exposing the actual implementation of how these parameters are obtained.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description XSSMatchActiongetActionOnMatch()The action to be performed whenever a value is encountered which matches a filtering pattern.java.util.Map<java.lang.String,java.lang.String>getHeadersToInject()In addition to matching patterns this method allows to specify a map of response headers to be injected into each response.java.util.Map<java.lang.String,java.lang.String>getHostHeaderWhiteList()RegExp patterns that host header whitelist is made of.java.util.Map<java.lang.String,java.lang.String>getPatternDefinitions()All regExp patterns to scan for.booleanisEnabled()Enables/disables XSS logic.voidregisterForConfigChanges(XSSFilter toUpdateOnConfigChange)Called by the filter in case it wants to be notified on configuration changes ( any property matchingXSSFilter.CONFIG_RULE_PREFIX_REGEXP).default booleansortRules()Enables sorting rules by their names in alphabetical order.voidunregisterConfigChangeListener()Called by the filter when it does no longer wants to be notified about configuration changes.
-
-
-
Method Detail
-
isEnabled
boolean isEnabled()
Enables/disables XSS logic. When switched off the filter should have no effect.
-
sortRules
default boolean sortRules()
Enables sorting rules by their names in alphabetical order. This way the order or rules can be guaranteed.
-
getActionOnMatch
XSSMatchAction getActionOnMatch()
The action to be performed whenever a value is encountered which matches a filtering pattern. Default should beXSSMatchAction.STRIP.
-
getPatternDefinitions
java.util.Map<java.lang.String,java.lang.String> getPatternDefinitions()
All regExp patterns to scan for. Note that the map keys just represent pattern names used for information purposes (e.g. when the pattern doesn't compile).
-
getHeadersToInject
java.util.Map<java.lang.String,java.lang.String> getHeadersToInject()
In addition to matching patterns this method allows to specify a map of response headers to be injected into each response.
-
getHostHeaderWhiteList
java.util.Map<java.lang.String,java.lang.String> getHostHeaderWhiteList()
RegExp patterns that host header whitelist is made of.
-
registerForConfigChanges
void registerForConfigChanges(XSSFilter toUpdateOnConfigChange)
Called by the filter in case it wants to be notified on configuration changes ( any property matchingXSSFilter.CONFIG_RULE_PREFIX_REGEXP). Each time this happensXSSFilter.reloadOnConfigChange()is being called.
-
unregisterConfigChangeListener
void unregisterConfigChangeListener()
Called by the filter when it does no longer wants to be notified about configuration changes.
-
-