Skip to content

Commit

Permalink
mitigation for CVE-2015-20107 (#271)
Browse files Browse the repository at this point in the history
Fixes: #270

Co-authored-by: Kevin Chan <a.aacdx@gmail.com>
  • Loading branch information
kalashnlkov and Kevin Chan committed Aug 8, 2022
1 parent 49981d1 commit 2b0c0cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tg/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def get_file_handler(file_path: str) -> str:
return config.DEFAULT_OPEN.format(file_path=shlex.quote(file_path))

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:
return config.DEFAULT_OPEN.format(file_path=shlex.quote(file_path))
return handler
Expand Down

0 comments on commit 2b0c0cf

Please sign in to comment.