public class CQXSSUtils
extends org.apache.sling.testing.clients.util.XSSUtils
Modifier and Type | Field and Description |
---|---|
static String |
XSS_ATTACK_HERF_SIMPLE |
static String |
XSS_ATTACK_JS_CASE_INSENSITIVE |
static String |
XSS_ATTACK_JS_SIMPLE |
static String |
XSS_ATTACK_JS_SIMPLE2 |
static String |
XSS_ATTACK_SIMPLE |
Constructor and Description |
---|
CQXSSUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
assertTitleTagIsNotVulnerable(org.apache.sling.testing.clients.SlingHttpResponse response,
String expectedTitle)
Assert title output is sanitized in head
|
static String |
escapeXmlJSTL(String xmlString)
Use to encapsulate escaping of XML with standard JSTL.
|
static String |
replaceSpecialCharsForRegexp(String regexp)
Replaces special chars to avoid breaking the regexp
|
public static final String XSS_ATTACK_SIMPLE
public static final String XSS_ATTACK_JS_SIMPLE
public static final String XSS_ATTACK_JS_SIMPLE2
public static final String XSS_ATTACK_JS_CASE_INSENSITIVE
public static final String XSS_ATTACK_HERF_SIMPLE
public static String escapeXmlJSTL(String xmlString)
XSSUtils.escapeXml(String)
xmlString
- string to escapepublic static String replaceSpecialCharsForRegexp(String regexp)
regexp
- regular expressionpublic static void assertTitleTagIsNotVulnerable(org.apache.sling.testing.clients.SlingHttpResponse response, String expectedTitle) throws IOException
response
- Sling response containing the pageexpectedTitle
- expected titleIOException
- neverCopyright © 2018. All rights reserved.