fix(PathHelper): Remove null bytes when normalizing path

Signed-off-by: provokateurin <kate@provokateurin.de>
pull/50052/head
provokateurin 2025-01-06 13:04:58 +07:00
parent 90c608bdc7
commit 1e28657093
No known key found for this signature in database
1 changed files with 2 additions and 0 deletions

@ -37,6 +37,8 @@ class PathHelper {
if ($path === '' or $path === '/') {
return '/';
}
// No null bytes
$path = str_replace(chr(0), '', $path);
//no windows style slashes
$path = str_replace('\\', '/', $path);
//add leading slash