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.
|
* @return string The sanitized filename.
|
||||||
*/
|
*/
|
||||||
// Remove any path information and null bytes
|
// Remove any path information and null bytes
|
||||||
$filename = realpath($filename);
|
$filename = basename($filename);
|
||||||
if ($filename === false) {
|
if ($filename === false) {
|
||||||
$filename = "";
|
$filename = "";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user