public class InputValidationUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CR_ENCODED_STRING_LOWER |
static String |
CR_ENCODED_STRING_UPPER |
static String |
CRLF_ENCODED_STRING_LOWER |
static String |
CRLF_ENCODED_STRING_UPPER |
static String |
CRLF_STRING |
| Constructor and Description |
|---|
InputValidationUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getSafeCookieHeaderValue(String headerValue)
Return Cookie Http Header Value after suitable validation
|
static String |
getSafeHeaderName(String headerName)
Return Http Header Name after suitable validation
|
static String |
getSafeHeaderValue(String headerValue)
Return Http Header Value after suitable validation
|
static String |
removeLinearWhiteSpaces(String input)
Remove unwanted white spaces in the URL.
|
static boolean |
validateStringforCRLF(String input)
Validate the String for Header Injection Attack.
|
public static final String CRLF_ENCODED_STRING_LOWER
public static final String CRLF_ENCODED_STRING_UPPER
public static final String CR_ENCODED_STRING_LOWER
public static final String CR_ENCODED_STRING_UPPER
public static final String CRLF_STRING
public static boolean validateStringforCRLF(String input)
input - String to be validatepublic static String removeLinearWhiteSpaces(String input)
input - String to be stripped with whitespacespublic static String getSafeHeaderName(String headerName) throws Exception
headerName - Header Name which should be validated before being setExceptionpublic static String getSafeHeaderValue(String headerValue) throws Exception
headerValue - Header Value which should be validated before being setExceptionpublic static String getSafeCookieHeaderValue(String headerValue) throws Exception
headerValue - Header Value which should be validated before being setExceptionCopyright © 2017–2020 Eclipse Foundation. All rights reserved.