瀏覽代碼

Escape ".." in path regexp properly.

Lauri Alanko 10 年之前
父節點
當前提交
89e9528d0b
共有 1 個文件被更改,包括 1 次插入1 次删除
  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):