mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-05-10 07:53:45 -04:00
fixed remove multiple leading slashes
This commit is contained in:
committed by
Andrew Tridgell
parent
a4b926dcdc
commit
d4c4f6754e
@@ -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)")
|
||||
|
||||
Reference in New Issue
Block a user