Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 31648
Status: resolved
Priority: 0/
Queue: CGI

Owner: Nobody in particular
Requestors: msuchy [...]

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)

Subject: [PATCH] url() handle script_name as regex
Download (untitled) / with headers
text/plain 1.8k
I have this url: and it contains two plus, so I got this error: ==> /var/log/httpd/ssl_error_log <== [Tue Dec 18 13:30:51 2007] [error] [client] Nested quantifiers in regex; marked by <-- HERE in m/^/satconfig/cgi-bin/fetch_netsaintid.cgi?ssk=437fc1d69144&publickey=ssh-dss AAAAB3NzaC1kc3MAAAXXXXXXXXXXXXXXiNA5oraeyCRskfsubZ62qSWg4F4LAPxF0jqzDuGM0X8fvnQnDkddK28+41BO6Om5R/p//r0Rs9M9yXrsvm+omGIgWEOWqxnEL3qtL64Kpf2+MX/h0h7LIDeF5z0Bovr2tvT3zcALdFlhj83uJqcWxOPAAAAFQCunhs9qUE5vSAIUDJRLjy0QFmr2QAAAIEAqizqsrAJHiftNrEgjx++ <-- HERE With this patch it works without problem: --- /var/www/lib/ 2007-12-18 16:22:55.000000000 +0100 +++ /var/www/lib/ 2007-12-18 16:23:56.000000000 +0100 @@ -2692,7 +2692,7 @@ my $request_uri = unescape($self->request_uri) || ''; my $query_str = $self->query_string; - my $rewrite_in_use = $request_uri && $request_uri !~ /^$script_name/; + my $rewrite_in_use = $request_uri && $request_uri !~ /^\Q$script_name/; undef $path if $rewrite_in_use && $rewrite; # path not valid when rewriting active my $uri = $rewrite && $request_uri ? $request_uri : $script_name;
From: cpan [...]
Download (untitled) / with headers
text/plain 467b
Hi, there can be the same problem with $path in the url() method. This is even not quoted. $uri =~ s/$path$// if defined $path; # remove path I suggest the same bugfix like for $script_name: $uri =~ s/\Q$path$// if defined $path; # remove path PS: With mod_perl ist's easier to reproduce the described bug with $script_name: sat a Handler for / and call[] You'll get this error: Unmatched [ in regex; marked by <-- HERE in m/^/ [ <-- HERE ]/
Fixed in 3.34, which will be released sometime soon.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to