Package org.apache.ofbiz.security
Class SecuredUpload
- java.lang.Object
-
- org.apache.ofbiz.security.SecuredUpload
-
public class SecuredUpload extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SecuredUpload()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isValidFile(java.lang.String fileToCheck, java.lang.String fileType, Delegator delegator)
static boolean
isValidFileName(java.lang.String fileToCheck, Delegator delegator)
static boolean
isValidText(java.lang.String content, java.util.List<java.lang.String> allowed)
-
-
-
Method Detail
-
isValidText
public static boolean isValidText(java.lang.String content, java.util.List<java.lang.String> allowed) throws java.io.IOException
- Throws:
java.io.IOException
-
isValidFileName
public static boolean isValidFileName(java.lang.String fileToCheck, Delegator delegator) throws java.io.IOException
- Throws:
java.io.IOException
-
isValidFile
public static boolean isValidFile(java.lang.String fileToCheck, java.lang.String fileType, Delegator delegator) throws java.io.IOException, org.apache.commons.imaging.ImageReadException
- Parameters:
fileToCheck
-fileType
-- Returns:
- true if the file is valid
- Throws:
java.io.IOException
org.apache.commons.imaging.ImageReadException
-
-