]> 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:07:39 +0000 (21:07 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Mon, 7 May 2012 19:07:39 +0000 (21:07 +0200)
r/a=LpSolit

jobqueue.pl

index f56e2cdb6fbdb7928aaa536edb91655d14c9a0e6..1b956917e088f8a53b4b34699959b793fe3c4a55 100755 (executable)
@@ -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;