org.owasp.esapi
Class SafeFile
java.lang.Object
java.io.File
org.owasp.esapi.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.
- See Also:
- Serialized Form
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, toString, toURI, toURL |
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
Copyright © 2013 The Open Web Application Security Project (OWASP). All Rights Reserved.