Package org.codice.ddf.platform.util
Class InputValidation
java.lang.Object
org.codice.ddf.platform.util.InputValidation
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisFileNameClientSideSafe(String filename) Checks for filenames that have been disallowed by the system.static booleanisMimeTypeClientSideSafe(String mimetype) Checks for mime types that have been disallowed by the system.static StringsanitizeFilename(String filename) Removes disallowed characters and file extensions from the filename.
-
Method Details
-
sanitizeFilename
Removes disallowed characters and file extensions from the filename.- Parameters:
filename- - filename to sanitize- Returns:
- sanitized filename
-
isMimeTypeClientSideSafe
Checks for mime types that have been disallowed by the system.- Returns:
- true if the mime type is acceptable
-
isFileNameClientSideSafe
Checks for filenames that have been disallowed by the system.- Returns:
- true if the filename is acceptable
-