public class InputValidation extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
isFileNameClientSideSafe(String filename)
Checks for filenames that have been disallowed by the system.
|
static boolean |
isMimeTypeClientSideSafe(String mimetype)
Checks for mime types that have been disallowed by the system.
|
static String |
sanitizeFilename(String filename)
Removes disallowed characters and file extensions from the filename.
|
public static String sanitizeFilename(String filename)
filename
- - filename to sanitizepublic static boolean isMimeTypeClientSideSafe(String mimetype)
public static boolean isFileNameClientSideSafe(String filename)
This work is licensed under a Creative Commons Attribution 4.0 International License.