From 01c755c165ab797ff20e2481e14b298d0f1b3e9d Mon Sep 17 00:00:00 2001 From: Paul Nameless Date: Sat, 24 Apr 2021 18:51:07 +0300 Subject: [PATCH] Escape safely shell arguments --- tg/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tg/utils.py b/tg/utils.py index 8768926..dd67095 100644 --- a/tg/utils.py +++ b/tg/utils.py @@ -182,7 +182,7 @@ def notify( icon_path=shlex.quote(config.ICON_PATH), title=shlex.quote(title), subtitle=shlex.quote(subtitle), - msg=shlex.quote(msg), + msg=shlex.quote(msg.replace("'", "'\\''") + "'"), ) subprocess.Popen(notify_cmd, shell=True)