Package org.primefaces.shaded.owasp
Class SafeFile
- java.lang.Object
-
- java.io.File
-
- org.primefaces.shaded.owasp.SafeFile
-
- All Implemented Interfaces:
Serializable
,Comparable<File>
public class SafeFile extends File
Extension to java.io.File to prevent against null byte injections and other unforeseen problems resulting from unprintable characters causing problems in path lookups. This does _not_ prevent against directory traversal attacks. OWASP Enterprise Security API (ESAPI) This file is part of the Open Web Application Security Project (OWASP) Enterprise Security API (ESAPI) project. For details, please see http://www.owasp.org/index.php/ESAPI. Copyright (c) 2008 - The OWASP Foundation The ESAPI is published by OWASP under the BSD license. You should read and accept the LICENSE before you use, modify, and/or redistribute this software.- Author:
- Arshan Dabirsiaghi Aspect Security
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
-
-
Method Summary
-
Methods inherited from class java.io.File
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURL
-
-
-
-
Constructor Detail
-
SafeFile
public SafeFile(String path) throws ValidationException
- Throws:
ValidationException
-
SafeFile
public SafeFile(String parent, String child) throws ValidationException
- Throws:
ValidationException
-
SafeFile
public SafeFile(File parent, String child) throws ValidationException
- Throws:
ValidationException
-
SafeFile
public SafeFile(URI uri) throws ValidationException
- Throws:
ValidationException
-
-