소스 검색

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):