소스 검색

regexp fixes and validation (#829)

Wojciech Zygmunt Porczyk 10 년 전
부모
커밋
fe954632c0
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      qubesmanager/backup_utils.py

+ 2 - 0
qubesmanager/backup_utils.py

@@ -210,6 +210,8 @@ def get_path_for_vm(vm, service_name):
     if len(untrusted_path) == 0:
         return None
     if path_re.match(untrusted_path):
+        assert '../' not in untrusted_path
+        assert '\0' not in untrusted_path
         return untrusted_path.strip()
     else:
         return None