From 2b222a696035597e471c03b3cfa858f0d64f65c9 Mon Sep 17 00:00:00 2001 From: HÃ¥kan Jerning Date: Mon, 7 May 2012 21:07:39 +0200 Subject: Bug 744338: jobqueue.pl won't work if not called from the bugzilla/ root directory r/a=LpSolit --- jobqueue.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'jobqueue.pl') diff --git a/jobqueue.pl b/jobqueue.pl index f56e2cdb6..1b956917e 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; -- cgit v1.2.3-24-g4f1b