aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2025-01-06 13:04:58 +0100
committerprovokateurin <kate@provokateurin.de>2025-01-13 15:21:21 +0100
commit1e2865709358a7272551f953c5f80832f3d26155 (patch)
treef475f189d22eda827a35e543536b8810d4109109 /lib
parent90c608bdc7ef1ed4fe683b49ff73212680659348 (diff)
downloadnextcloud-server-1e2865709358a7272551f953c5f80832f3d26155.tar.gz
nextcloud-server-1e2865709358a7272551f953c5f80832f3d26155.zip
fix(PathHelper): Remove null bytes when normalizing pathfix/files_sharing/harden-api
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Utils/PathHelper.php2
1 files changed, 2 insertions, 0 deletions
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