Package org.apache.ofbiz.security
Class SecuredUpload
java.lang.Object
org.apache.ofbiz.security.SecuredUpload
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isValidFile
(String fileToCheck, String fileType, Delegator delegator) static boolean
isValidFileName
(String fileToCheck, Delegator delegator) static boolean
isValidText
(String content, List<String> allowed)
-
Constructor Details
-
SecuredUpload
public SecuredUpload()
-
-
Method Details
-
isValidText
- Throws:
IOException
-
isValidFileName
- Throws:
IOException
-
isValidFile
public static boolean isValidFile(String fileToCheck, String fileType, Delegator delegator) throws IOException, org.apache.commons.imaging.ImageReadException - Parameters:
fileToCheck
-fileType
-- Returns:
- true if the file is valid
- Throws:
IOException
org.apache.commons.imaging.ImageReadException
-