Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Escape CGI key in regex #3

Closed
wants to merge 1 commit into from

2 participants

@rckclmbr

Escape cgi key to avoid it being evaluated as a regex, and throwing an exception if it isn't proper (for example, if it has a parenthesis)

Josh Braegger Escape cgi key to avoid it being evaluated as a regex, and throwing a…
…n exception if it isn't proper (for example, if it has a parenthesis)
036645f
@rckclmbr rckclmbr closed this
@rckclmbr rckclmbr reopened this
@interchange

Thanks, Josh. This was committed to master in 69d52e5 on 2011-10-27.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 27, 2011
  1. Escape cgi key to avoid it being evaluated as a regex, and throwing a…

    Josh Braegger authored
    …n exception if it isn't proper (for example, if it has a parenthesis)
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/Vend/Server.pm
View
2  lib/Vend/Server.pm
@@ -296,7 +296,7 @@ sub store_cgi_kv {
$key = lc ($key) if
$Global::DowncaseVarname
- && $Global::DowncaseVarname =~ /\b$key\b/i;
+ && $Global::DowncaseVarname =~ /\b\Q$key\E\b/i;
$key = $::IV->{$key} if defined $::IV->{$key};
if(defined $CGI::values{$key} and ! defined $::SV{$key}) {
Something went wrong with that request. Please try again.