Explorar o código

Escape ".." in path regexp properly.

Lauri Alanko %!s(int64=10) %!d(string=hai) anos
pai
achega
89e9528d0b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      attic/helpers.py

+ 1 - 1
attic/helpers.py

@@ -498,7 +498,7 @@ def remove_surrogates(s, errors='replace'):
     return s.encode('utf-8', errors).decode('utf-8')
 
 
-_safe_re = re.compile('^((..)?/+)+')
+_safe_re = re.compile('^((\.\.)?/+)+')
 
 
 def make_path_safe(path):