Return-Path: Delivered-To: apmail-perl-test-commits-archive@www.apache.org Received: (qmail 577 invoked from network); 24 Dec 2005 18:25:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Dec 2005 18:25:08 -0000 Received: (qmail 9407 invoked by uid 500); 24 Dec 2005 18:25:07 -0000 Mailing-List: contact test-commits-help@perl.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: test-dev@perl.apache.org Delivered-To: mailing list test-commits@perl.apache.org Received: (qmail 9392 invoked by uid 99); 24 Dec 2005 18:25:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Dec 2005 10:25:07 -0800 X-ASF-Spam-Status: No, hits=-9.4 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.29) with SMTP; Sat, 24 Dec 2005 10:25:07 -0800 Received: (qmail 97292 invoked by uid 65534); 24 Dec 2005 18:24:46 -0000 Message-ID: <20051224182446.97291.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r358943 - /perl/Apache-Test/trunk/lib/Apache/TestConfig.pm Date: Sat, 24 Dec 2005 18:24:46 -0000 To: test-commits@perl.apache.org From: stas@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: stas Date: Sat Dec 24 10:24:43 2005 New Revision: 358943 URL: http://svn.apache.org/viewcvs?rev=358943&view=rev Log: use a crossplatform solution to figure out which paths are relative Modified: perl/Apache-Test/trunk/lib/Apache/TestConfig.pm Modified: perl/Apache-Test/trunk/lib/Apache/TestConfig.pm URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/lib/Apache/TestConfig.pm?rev=358943&r1=358942&r2=358943&view=diff ============================================================================== --- perl/Apache-Test/trunk/lib/Apache/TestConfig.pm (original) +++ perl/Apache-Test/trunk/lib/Apache/TestConfig.pm Sat Dec 24 10:24:43 2005 @@ -1744,14 +1744,15 @@ $self->{_apxs}{$q}; } -# Temporarily untaint PATH +# return an untainted PATH sub untaint_path { my $path = shift; ($path) = ( $path =~ /(.*)/ ); # win32 uses ';' for a path separator, assume others use ':' my $sep = WIN32 ? ';' : ':'; # -T disallows relative and empty directories in the PATH - return join $sep, grep !m#^(?:[^/]|$)#, split /$sep/, $path; + return join $sep, grep File::Spec->file_name_is_absolute($_), + grep length($_), split /$sep/, $path; } sub pop_dir {