public class XSSUrlParamSecurityAdapter extends WhiteBlackExpressionSecurityAdapter
| Modifier and Type | Field and Description |
|---|---|
static String |
BLACK_URL_REGEX_PROP |
static String |
WHITE_URL_REGEX_PROP |
blackRegExPattern, whiteRegExPatternREGEX_PROP_FILE| Constructor and Description |
|---|
XSSUrlParamSecurityAdapter() |
| Modifier and Type | Method and Description |
|---|---|
Data<String> |
preProcess(Data<String> input)
For Absolute URL's we can determine the genuine host name (or pick from config) and sanitize those out from the input.
|
protected void |
processInvalidQuery(Data<String> input) |
Data |
sanitize(Data<String> input)
Sanitize content, from malicious to harmless.
|
void |
validate(Data<String> input)
Check if the input is safe or not
When used in a chained or a SecurityContext with other SecurityAdapters then the Adapters throwing
a OperationNotSupportedException will be ignored. |
getBlackRegExPattern, getWhiteRegExPattern, processNameValue, processParams, setBlackRegExPattern, setWhiteRegExPattern, validateAgainstBlackRegEx, validateAgainstWhiteRegExpublic static final String BLACK_URL_REGEX_PROP
public static final String WHITE_URL_REGEX_PROP
public XSSUrlParamSecurityAdapter()
throws IOException
IOExceptionpublic Data sanitize(Data<String> input) throws org.owasp.validator.html.ScanException, org.owasp.validator.html.PolicyException, OperationNotSupportedException
SecurityAdapterOperationNotSupportedException.
When used in a chained or a SecurityContext with other SecurityAdapters then the Adapters throwing
a OperationNotSupportedException will be ignored. Any other exception will be thrown if there is
an issue in the executionof the sanitization process.sanitize in interface SecurityAdapter<String>sanitize in class WhiteBlackExpressionSecurityAdapterorg.owasp.validator.html.ScanExceptionorg.owasp.validator.html.PolicyExceptionOperationNotSupportedExceptionpublic Data<String> preProcess(Data<String> input)
input - @Nullablepublic void validate(Data<String> input) throws SecurityException, IOException
SecurityAdapterSecurityContext with other SecurityAdapters then the Adapters throwing
a OperationNotSupportedException will be ignored.validate in interface SecurityAdapter<String>validate in class WhiteBlackExpressionSecurityAdapterinput - as DataSecurityException - is its is not safe. This is to provide additional details about the failure that te return param cannot.IOException - for any type of setup, reading, infra related issue with files/configsprotected void processInvalidQuery(Data<String> input) throws SecurityException, IOException
processInvalidQuery in class WhiteBlackExpressionSecurityAdapterSecurityExceptionIOExceptionCopyright © 2018. All rights reserved.