You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by ph...@apache.org on 2007/03/23 05:43:57 UTC

svn commit: r521584 - in /perl/modperl/trunk: Changes ModPerl-Registry/lib/ModPerl/RegistryCooker.pm

Author: phred
Date: Thu Mar 22 21:43:57 2007
New Revision: 521584

URL: http://svn.apache.org/viewvc?view=rev&rev=521584
Log:
fix unescaped variable interpolation in regular expression

Reported  by:  Eric Snyder, Perrin Harkins
Submitted by:  Fred Moyer, Randal Schwartz
Reviewed  by:  Philip Gollucci, Randy Kobes

Modified:
    perl/modperl/trunk/Changes
    perl/modperl/trunk/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm

Modified: perl/modperl/trunk/Changes
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/Changes?view=diff&rev=521584&r1=521583&r2=521584
==============================================================================
--- perl/modperl/trunk/Changes (original)
+++ perl/modperl/trunk/Changes Thu Mar 22 21:43:57 2007
@@ -12,6 +12,9 @@
 
 =item 2.0.4-dev
 
+fix unescaped variable interprolation in regular expression
+[Randal L. Schwartz <me...@stonehenge.com>, Fred Moyer <fr...@redhotpenguin.com>]
+
 Make $r->the_request() writeable
 [Fred Moyer <fr...@redhotpenguin.com>]
 

Modified: perl/modperl/trunk/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm?view=diff&rev=521584&r1=521583&r2=521584
==============================================================================
--- perl/modperl/trunk/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm (original)
+++ perl/modperl/trunk/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm Thu Mar 22 21:43:57 2007
@@ -337,7 +337,7 @@
     my $self = shift;
 
     my $path_info = $self->{REQ}->path_info;
-    my $script_name = $path_info && $self->{URI} =~ /$path_info$/
+    my $script_name = $path_info && $self->{URI} =~ /\Q$path_info\E$/
         ? substr($self->{URI}, 0, length($self->{URI}) - length($path_info))
         : $self->{URI};