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>
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)
+++ /dev/null
-^samba.tests.gpo.samba.tests.gpo.GPOTests.test_check_safe_path_typesafe_name