Escape safely shell arguments

This commit is contained in:
Paul Nameless 2021-04-24 18:51:07 +03:00
parent 0a073fe33e
commit 01c755c165

View file

@ -182,7 +182,7 @@ def notify(
icon_path=shlex.quote(config.ICON_PATH), icon_path=shlex.quote(config.ICON_PATH),
title=shlex.quote(title), title=shlex.quote(title),
subtitle=shlex.quote(subtitle), subtitle=shlex.quote(subtitle),
msg=shlex.quote(msg), msg=shlex.quote(msg.replace("'", "'\\''") + "'"),
) )
subprocess.Popen(notify_cmd, shell=True) subprocess.Popen(notify_cmd, shell=True)