Return-Path: Delivered-To: apmail-httpd-test-cvs-archive@www.apache.org Received: (qmail 64979 invoked from network); 21 Sep 2004 05:39:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 21 Sep 2004 05:39:28 -0000 Received: (qmail 40160 invoked by uid 500); 21 Sep 2004 05:39:27 -0000 Delivered-To: apmail-httpd-test-cvs-archive@httpd.apache.org Received: (qmail 40138 invoked by uid 500); 21 Sep 2004 05:39:27 -0000 Mailing-List: contact test-cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-cvs@httpd.apache.org Received: (qmail 40123 invoked by uid 99); 21 Sep 2004 05:39:26 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 20 Sep 2004 22:39:25 -0700 Received: (qmail 64915 invoked by uid 1631); 21 Sep 2004 05:39:24 -0000 Date: 21 Sep 2004 05:39:24 -0000 Message-ID: <20040921053924.64914.qmail@minotaur.apache.org> From: gozer@apache.org To: httpd-test-cvs@apache.org Subject: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N gozer 2004/09/20 22:39:23 Modified: perl-framework/Apache-Test Changes perl-framework/Apache-Test/lib/Apache TestConfig.pm Log: In open_cmd, sanitize PATH instead of clearing it Revision Changes Path 1.168 +2 -0 httpd-test/perl-framework/Apache-Test/Changes Index: Changes =================================================================== RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v retrieving revision 1.167 retrieving revision 1.168 diff -u -r1.167 -r1.168 --- Changes 17 Sep 2004 18:24:14 -0000 1.167 +++ Changes 21 Sep 2004 05:39:23 -0000 1.168 @@ -8,6 +8,8 @@ =item 1.14-dev +In open_cmd, sanitize PATH instead of clearing it [Gozer] + Allow / \ and \\ path delimiters in SKIP file [Markus Wichitill ] 1.246 +6 -1 httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm Index: TestConfig.pm =================================================================== RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v retrieving revision 1.245 retrieving revision 1.246 diff -u -r1.245 -r1.246 --- TestConfig.pm 16 Sep 2004 21:36:13 -0000 1.245 +++ TestConfig.pm 21 Sep 2004 05:39:23 -0000 1.246 @@ -1013,8 +1013,13 @@ sub open_cmd { my($self, $cmd) = @_; # untaint some %ENV fields - local @ENV{ qw(PATH IFS CDPATH ENV BASH_ENV) }; + local @ENV{ qw(IFS CDPATH ENV BASH_ENV) }; + # Temporarly untaint PATH + (local $ENV{PATH}) = ( $ENV{PATH} =~ /(.*)/ ); + # -T doesn't like . in the PATH + $ENV{PATH} =~ s#(^|:)\.[/\\]?(:|$)##; + my $handle = Symbol::gensym(); open $handle, "$cmd|" or die "$cmd failed: $!";