1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

samba-gpupdate: Check sysvol download paths in case-insensitive way

https://bugzilla.samba.org/show_bug.cgi?id=14665

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Björn Baumbach <bb@sernet.de>
This commit is contained in:
David Mulder 2021-03-09 11:13:40 -07:00 committed by Björn Baumbach
parent 554f2134a9
commit 2d6bed495e
2 changed files with 3 additions and 3 deletions

View File

@ -393,8 +393,9 @@ def cache_gpo_dir(conn, cache, sub_dir):
def check_safe_path(path):
dirs = re.split('/|\\\\', path)
if 'sysvol' in path:
dirs = dirs[dirs.index('sysvol') + 1:]
if 'sysvol' in path.lower():
ldirs = re.split('/|\\\\', path.lower())
dirs = dirs[ldirs.index('sysvol') + 1:]
if '..' not in dirs:
return os.path.join(*dirs)
raise OSError(path)

View File

@ -1 +0,0 @@
^samba.tests.gpo.samba.tests.gpo.GPOTests.test_check_safe_path_typesafe_name