perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r521763 - /perl/modperl/trunk/ModPerl-Registry/t/regex.t
Date Fri, 23 Mar 2007 15:27:48 GMT
Author: geoff
Date: Fri Mar 23 08:27:47 2007
New Revision: 521763

URL: http://svn.apache.org/viewvc?view=rev&rev=521763
Log:
add in regex quoting test

Added:
    perl/modperl/trunk/ModPerl-Registry/t/regex.t

Added: perl/modperl/trunk/ModPerl-Registry/t/regex.t
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/ModPerl-Registry/t/regex.t?view=auto&rev=521763
==============================================================================
--- perl/modperl/trunk/ModPerl-Registry/t/regex.t (added)
+++ perl/modperl/trunk/ModPerl-Registry/t/regex.t Fri Mar 23 08:27:47 2007
@@ -0,0 +1,33 @@
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestUtil qw(t_cmp t_catfile_apache);
+use Apache::TestRequest;
+use Apache::TestConfig ();
+
+my %modules = (
+    registry    => 'ModPerl::Registry',
+    registry_bb => 'ModPerl::RegistryBB',
+    perlrun     => 'ModPerl::PerlRun',
+);
+
+my @aliases = sort keys %modules;
+
+plan tests => @aliases * 1, need 'mod_alias.c';
+
+my $vars = Apache::Test::config()->{vars};
+my $script_file = t_catfile_apache $vars->{serverroot}, 'cgi-bin', 'basic.pl';
+
+# extended regex quoting
+# CVE-2007-1349 (which doesn't affect any of our shipped handlers)
+
+for my $alias (@aliases) {
+    my $url = "/$alias/basic.pl/(";
+
+    ok t_cmp(
+        GET_BODY($url),
+        "ok $script_file",
+        "$modules{$alias} regex in path_info",
+    );
+}



Mime
View raw message