mirror of
https://github.com/paul-nameless/tg
synced 2024-11-22 03:43:19 +00:00
mitigation for CVE-2015-20107 (#271)
Fixes: https://github.com/paul-nameless/tg/issues/270 Co-authored-by: Kevin Chan <a.aacdx@gmail.com>
This commit is contained in:
parent
49981d1247
commit
2b0c0cf199
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ def get_file_handler(file_path: str) -> str:
|
||||||
return config.DEFAULT_OPEN.format(file_path=shlex.quote(file_path))
|
return config.DEFAULT_OPEN.format(file_path=shlex.quote(file_path))
|
||||||
|
|
||||||
caps = get_mailcap()
|
caps = get_mailcap()
|
||||||
handler, view = mailcap.findmatch(caps, mtype, filename=file_path)
|
handler, view = mailcap.findmatch(caps, mtype, filename=shlex.quote(file_path))
|
||||||
if not handler:
|
if not handler:
|
||||||
return config.DEFAULT_OPEN.format(file_path=shlex.quote(file_path))
|
return config.DEFAULT_OPEN.format(file_path=shlex.quote(file_path))
|
||||||
return handler
|
return handler
|
||||||
|
|
Loading…
Reference in a new issue