summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-05-28 20:20:44 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-05-28 20:20:44 +0200
commit662d82ec2badc34f4de561021ea714afe1e1bddc (patch)
tree2210ec9bfd1795b5b304179bb66db53510cafb53
parentc98c4a7d6108abdb49c3d80aaf301c3cb44a9aaf (diff)
downloadspampd-662d82ec2badc34f4de561021ea714afe1e1bddc.tar.gz
spampd-662d82ec2badc34f4de561021ea714afe1e1bddc.tar.xz
untaint $pidfile to prevent errors when opening it
For some reason that worked before perl 5.18, but I don't care enough to figure out why. Since we trust the CLI args untaining anything should be ok. Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--spampd.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/spampd.pl b/spampd.pl
index 7b1f234..53161d9 100644
--- a/spampd.pl
+++ b/spampd.pl
@@ -937,6 +937,8 @@ if ( !$options{logsock} ) {
};
}
+# untaint pidfile
+($pidfile) = ($pidfile =~ /^(.+)$/);
my $server = bless {
server => {host => $host,