public final class SecurityUtils extends Object
| Constructor and Description |
|---|
SecurityUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
crlf(String s)
Replaces CRLF characters in a string with empty string ("").
|
static String |
encode(String s)
Escapes all special characters in a java string
|
static String |
getValidFilePath(String inputPath) |
static String |
getValidFilePath(String inputPath,
boolean isWrite)
Returns an absolute file path given an input path and validates that it is not trying
to write/read from a directory other than /tmp.
|
static boolean |
isValidHost(String host,
String apiId,
String region) |
static boolean |
isValidPort(String port) |
static boolean |
isValidScheme(String scheme) |
public static boolean isValidPort(String port)
public static boolean isValidScheme(String scheme)
public static String crlf(String s)
s - The string to be cleanedpublic static String encode(String s)
s - The string to be cleanedpublic static String getValidFilePath(String inputPath, boolean isWrite)
inputPath - The input pathIllegalArgumentException - If the given path is not valid or outside of /tmpCopyright © 2022. All rights reserved.