proposed fix to endless bug
John Napiorkowski [Mon, 19 Dec 2016 15:10:29 +0000 (09:10 -0600)]
lib/Catalyst/Dispatcher.pm

index d3f25a3..cf98256 100644 (file)
@@ -439,7 +439,7 @@ C<$path> is '/foo/../bar' that is normalized to '/bar'.
 
 sub get_action_by_path {
     my ( $self, $path ) = @_;
-    $path =~s/[^\/]+\/\.\.\/// while $path=~m/\.\./;
+    $path =~s/[^\/]+\/\.\.\/// while $path=~m/[^\/]+\/\.\.\//;
     $path =~ s/^\///;
     $path = "/$path" unless $path =~ /\//;
     $self->_action_hash->{$path};