public final class BambooStringUtils extends Object
Modifier and Type | Field and Description |
---|---|
static char |
CHAR_APOSTROPHE |
static char |
CHAR_BACKSLASH |
static char |
CHAR_DOUBLE_QUOTE |
static char[] |
RELAXED_XSS_RELATED_CHARACTERS |
static String |
SHELL_INJECTION_DOLLAR_PARENTHESIS |
static char[] |
SHELL_INJECTION_RELATED_CHARACTERS |
static char[] |
XSS_RELATED_CHARACTERS |
static String |
XSS_RELATED_CHARACTERS_FIND_STR |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsRelatedCharacters(String string,
char[] characters) |
static boolean |
containsRelaxedXssRelatedCharacters(String string)
Relaxed xss check that allows \ character (mainly for repositories on Windows).
|
static boolean |
containsShellInjectionRelatedCharacters(String string) |
static boolean |
containsXssRelatedCharacters(String string)
Returns true if the supplied string contains characters that could be used to deface a page
or trigger an XSS exploit (characters: "&'<>\).
|
public static final char CHAR_APOSTROPHE
public static final char CHAR_BACKSLASH
public static final char CHAR_DOUBLE_QUOTE
public static final char[] XSS_RELATED_CHARACTERS
public static final String XSS_RELATED_CHARACTERS_FIND_STR
public static final char[] RELAXED_XSS_RELATED_CHARACTERS
public static final char[] SHELL_INJECTION_RELATED_CHARACTERS
public static final String SHELL_INJECTION_DOLLAR_PARENTHESIS
public static boolean containsRelatedCharacters(@Nullable String string, @NotNull char[] characters)
public static boolean containsXssRelatedCharacters(@Nullable String string)
string
- string to checkpublic static boolean containsRelaxedXssRelatedCharacters(@Nullable String string)
string
- string to checkpublic static boolean containsShellInjectionRelatedCharacters(@Nullable String string)
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.