From 1e2865709358a7272551f953c5f80832f3d26155 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Mon, 6 Jan 2025 13:04:58 +0100 Subject: [PATCH] fix(PathHelper): Remove null bytes when normalizing path Signed-off-by: provokateurin --- lib/private/Files/Utils/PathHelper.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/private/Files/Utils/PathHelper.php b/lib/private/Files/Utils/PathHelper.php index a6ae029b957..db1294bcc10 100644 --- a/lib/private/Files/Utils/PathHelper.php +++ b/lib/private/Files/Utils/PathHelper.php @@ -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