]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 744338: jobqueue.pl won't work if not called from the bugzilla/ root directory
authorHåkan Jerning <hakjer@netinsight.net>
Mon, 7 May 2012 19:09:42 +0000 (21:09 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Mon, 7 May 2012 19:09:42 +0000 (21:09 +0200)
r/a=LpSolit

jobqueue.pl

index 3d495c422ad419340c9eb67953a25c5e858c0b21..775fe8dd649febc5f047ae5db41fb7b3e215d8b8 100755 (executable)
 #   Max Kanat-Alexander <mkanat@bugzilla.org>
 
 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;