$filenameBadChars
$filenameBadChars : array
List of sanitize filename strings
HTTP security handler.
__construct(\Config\App $config)
Security constructor.
Stores our configuration and fires off the init() method to setup initial state.
\Config\App | $config |
CSRFVerify(\CodeIgniter\HTTP\RequestInterface $request) : $this|false
CSRF Verify
\CodeIgniter\HTTP\RequestInterface | $request |
CSRFSetCookie(\CodeIgniter\HTTP\RequestInterface|\CodeIgniter\HTTP\IncomingRequest $request) : \CodeIgniter\Security\Security|false
CSRF Set Cookie
\CodeIgniter\HTTP\RequestInterface|\CodeIgniter\HTTP\IncomingRequest | $request |
sanitizeFilename(string $str, boolean $relative_path = false) : string
Sanitize Filename
Tries to sanitize filenames in order to prevent directory traversal attempts and other security threats, which is particularly useful for files that were supplied via user input.
If it is acceptable for the user input to include relative paths, e.g. file/in/some/approved/folder.txt, you can set the second optional parameter, $relative_path to TRUE.
string | $str | Input file name |
boolean | $relative_path | Whether to preserve paths |
Loading…