From 74697b930064a2b07bed7f09a699f7abcb6a2dd6 Mon Sep 17 00:00:00 2001 From: HÃ¥kan Jerning Date: Mon, 7 May 2012 21:09:42 +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 3d495c422..775fe8dd6 100755 --- a/jobqueue.pl +++ b/jobqueue.pl @@ -22,8 +22,14 @@ # Max Kanat-Alexander 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