]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
fixed remove multiple leading slashes
authorfbuescher <github@4t.to>
Wed, 11 Jun 2025 07:27:59 +0000 (09:27 +0200)
committerAndrew Tridgell <andrew@tridgell.net>
Sat, 23 Aug 2025 07:14:43 +0000 (17:14 +1000)
support/rrsync

index 61f1d888effad200146769aa22763367834c6452..68e6fd8b9a40ac48e3284a491a69459966d4e600 100755 (executable)
@@ -301,6 +301,7 @@ def validated_arg(opt, arg, typ=3, wild=False):
     if arg.startswith('./'):
         arg = arg[1:]
     arg = arg.replace('//', '/')
+    arg = arg.lstrip('/')
     if args.dir != '/':
         if HAS_DOT_DOT_RE.search(arg):
             die("do not use .. in", opt, "(anchor the path at the root of your restricted dir)")