From: HÃ¥kan Jerning Date: Mon, 7 May 2012 19:07:39 +0000 (+0200) Subject: Bug 744338: jobqueue.pl won't work if not called from the bugzilla/ root directory X-Git-Tag: bugzilla-4.3.2~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b222a696035597e471c03b3cfa858f0d64f65c9;p=thirdparty%2Fbugzilla.git Bug 744338: jobqueue.pl won't work if not called from the bugzilla/ root directory r/a=LpSolit --- diff --git a/jobqueue.pl b/jobqueue.pl index f56e2cdb6f..1b956917e0 100755 --- a/jobqueue.pl +++ b/jobqueue.pl @@ -7,8 +7,14 @@ # defined by the Mozilla Public License, v. 2.0. use strict; + +use Cwd qw(abs_path); use File::Basename; -BEGIN { chdir dirname($0); } +BEGIN { + # Untaint the abs_path. + my ($a) = abs_path($0) =~ /^(.*)$/; + chdir dirname($a); +} use lib qw(. lib); use Bugzilla;