diff options
author | justdave%syndicomm.com <> | 2002-07-25 10:47:19 +0200 |
---|---|---|
committer | justdave%syndicomm.com <> | 2002-07-25 10:47:19 +0200 |
commit | 7827fe4d51198f046c5ab3c025f855cfee8d02c4 (patch) | |
tree | e538c98349aab07870eb55b791d91dd5e88e22fb /contrib/bugzilla_email_append.pl | |
parent | 689a307bc2aa88d26d8aa59606c1a7f97b0e1e45 (diff) | |
download | bugzilla-7827fe4d51198f046c5ab3c025f855cfee8d02c4.tar.gz bugzilla-7827fe4d51198f046c5ab3c025f855cfee8d02c4.tar.xz |
Fix for bug 154008: some basic (but incomplete) maintenance on bug_email.pl, also fixes a possible security hole with a misuse
of a system() call.
Patches by Erik Anderson <erikba@teamworkgroup.com> and Brad Baetz <bbaetz@student.usyd.edu.au>
r= myk, justdave
Diffstat (limited to 'contrib/bugzilla_email_append.pl')
-rwxr-xr-x | contrib/bugzilla_email_append.pl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/contrib/bugzilla_email_append.pl b/contrib/bugzilla_email_append.pl index b10d8e030..826b49198 100755 --- a/contrib/bugzilla_email_append.pl +++ b/contrib/bugzilla_email_append.pl @@ -32,7 +32,9 @@ use diagnostics; use strict; use MIME::Parser; -push @INC, "../."; # this script lives in contrib +chdir ".."; # this script lives in contrib, change to main +push @INC, "contrib"; +push @INC, "."; # this script lives in contrib require "globals.pl"; require "BugzillaEmail.pm"; @@ -43,10 +45,10 @@ my $Comment = ""; # Create and set the output directory: # FIXME: There should be a $BUGZILLA_HOME variable (SML) -(-d "../data/mimedump-tmp") or mkdir "../data/mimedump-tmp",0755 or die "mkdir: $!"; -(-w "../data/mimedump-tmp") or die "can't write to directory"; +(-d "data/mimedump-tmp") or mkdir "data/mimedump-tmp",0755 or die "mkdir: $!"; +(-w "data/mimedump-tmp") or die "can't write to directory"; -$parser->output_dir("../data/mimedump-tmp"); +$parser->output_dir("data/mimedump-tmp"); # Read the MIME message: my $entity = $parser->read(\*STDIN) or die "couldn't parse MIME stream"; @@ -120,6 +122,7 @@ system("cd .. ; ./processmail $found_id '$SenderShort'"); sub DealWithError { my ($reason) = @_; print $reason . "\n"; + exit 100; } # Yanking this wholesale from bug_email, 'cause I know this works. I'll |