From e1e6b1dd39c60ea24988df73c8c54f2319d68ff2 Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Fri, 4 Jul 2008 07:34:48 +0000 Subject: * Fix the code running collector handlers, to get it working when the perl script is in tained mode. --- debian/changelog | 7 +++++++ sitesummary-collector.cgi | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 5270207..785b2cc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +sitesummary (0.0.43) UNRELEASED; urgency=low + + * Fix the code running collector handlers, to get it working when + the perl script is in tained mode. + + -- Petter Reinholdtsen Fri, 13 Jun 2008 21:40:49 +0200 + sitesummary (0.0.42) unstable; urgency=low * Make sure to read /etc/environment in init.d/sitesummary-client diff --git a/sitesummary-collector.cgi b/sitesummary-collector.cgi index 5dcf972..c9fbf86 100644 --- a/sitesummary-collector.cgi +++ b/sitesummary-collector.cgi @@ -135,8 +135,12 @@ sub process_entry { } rename $dirname, $newdir || die; + + $ENV{"PATH"} = ""; for my $handler (<$handlerdir/*>) { - `$handler $newdir $status`; + # Untaint script path + $handler =~ m/^([^;]*)$/; $handler = $1; + system("$handler", "$newdir", "$status"); } } -- cgit v1.2.3