Skip to content
This repository
Browse code

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)
  • Loading branch information...
commit 036645f3f1f7fa26d1cdb94c6c690ee2466c9998 1 parent cbe37a8
Josh Braegger authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  lib/Vend/Server.pm
2  lib/Vend/Server.pm
@@ -296,7 +296,7 @@ sub store_cgi_kv {
296 296
297 297 $key = lc ($key) if
298 298 $Global::DowncaseVarname
299   - && $Global::DowncaseVarname =~ /\b$key\b/i;
  299 + && $Global::DowncaseVarname =~ /\b\Q$key\E\b/i;
300 300
301 301 $key = $::IV->{$key} if defined $::IV->{$key};
302 302 if(defined $CGI::values{$key} and ! defined $::SV{$key}) {

0 comments on commit 036645f

Please sign in to comment.
Something went wrong with that request. Please try again.