perl-test-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r358859 - in /perl/Apache-Test/trunk: Changes lib/Apache/TestConfig.pm
Date Fri, 23 Dec 2005 19:51:44 GMT
Author: stas
Date: Fri Dec 23 11:51:41 2005
New Revision: 358859

URL: http://svn.apache.org/viewcvs?rev=358859&view=rev
Log:
Adjust Apache::TestConfig::untaint_path() to handle relative paths
that don't start with /.

Modified:
    perl/Apache-Test/trunk/Changes
    perl/Apache-Test/trunk/lib/Apache/TestConfig.pm

Modified: perl/Apache-Test/trunk/Changes
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/Changes?rev=358859&r1=358858&r2=358859&view=diff
==============================================================================
--- perl/Apache-Test/trunk/Changes (original)
+++ perl/Apache-Test/trunk/Changes Fri Dec 23 11:51:41 2005
@@ -8,6 +8,9 @@
 
 =item 1.28-dev
 
+Adjust Apache::TestConfig::untaint_path() to handle relative paths
+that don't start with /.  [Stas]
+
 If perlpath is longer than 62 chars, some shells on certain platforms
 won't be able to run the shebang line, so when seeing a long perlpath
 use the eval workaround [Mike Smith <mike@mailchannels.com>]

Modified: perl/Apache-Test/trunk/lib/Apache/TestConfig.pm
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/lib/Apache/TestConfig.pm?rev=358859&r1=358858&r2=358859&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestConfig.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestConfig.pm Fri Dec 23 11:51:41 2005
@@ -1751,7 +1751,7 @@
     # 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 !/^(\.|$)/, split /$sep/, $path;
+    return join $sep, grep !m#^(?:[^/]|$)#, split /$sep/, $path;
 }
 
 sub pop_dir {



Mime
View raw message