summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2013-07-24 17:26:47 +0200
committerJan Pokorný <jpokorny@redhat.com>2013-07-24 17:26:47 +0200
commit30d09756a93d64ad4a3967b7db88c86e866e3ae5 (patch)
treee77b0be2bbce6f3f32576364538e46a691a7f363
parenta33895924f5fca5555f5c789a1c53ef860c7db48 (diff)
downloadirssi-notify-master.tar.gz
irssi-notify-master.tar.xz
irssi-notify-master.zip
Prevent shell injection vol. 2HEADmaster
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r--notify.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/notify.pl b/notify.pl
index e93633e..238368c 100644
--- a/notify.pl
+++ b/notify.pl
@@ -25,6 +25,7 @@ Irssi::settings_add_str('notify', 'notify_time', '5000');
sub sanitize {
my ($text) = @_;
+ $text =~ s/\\/\\\\\\\\/g;
$text =~ s/`/\\`/g;
$text =~ s/\$/\\\$/g;
encode_entities($text);