Update filename sanitization method
Sanitize the filename by removing path information.
This commit is contained in:
@@ -10,7 +10,7 @@ function Sf($filename) {
|
||||
* @return string The sanitized filename.
|
||||
*/
|
||||
// Remove any path information and null bytes
|
||||
$filename = realpath($filename);
|
||||
$filename = basename($filename);
|
||||
if ($filename === false) {
|
||||
$filename = "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user