Update filename sanitization method

Sanitize the filename by removing path information.
This commit is contained in:
Naiel
2026-02-21 21:57:14 +01:00
committed by GitHub
parent fd3576674c
commit 4e9c9bcf96

View File

@@ -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 = "";
}