Fix boot CD image path validation

re.match checks only beginning of the path. There should be
re.fullmatch.

Fixes QubesOS/qubes-issues#4860
This commit is contained in:
Marek Marczykowski-Górecki 2019-02-28 06:20:50 +01:00
父節點 7874aa73fe
當前提交 f6c8103f46
沒有發現已知的金鑰在資料庫的簽署中
GPG 金鑰 ID: 063938BA42CFA724

查看文件

@ -167,7 +167,7 @@ def get_path_from_vm(vm, service_name):
if not untrusted_path:
return None
if path_re.match(untrusted_path):
if path_re.fullmatch(untrusted_path):
assert '../' not in untrusted_path
assert '\0' not in untrusted_path
return untrusted_path.strip()