in reply to Re^5: Using Regexp Patterns as Variables
in thread Using Regexp Patterns as Variables
$ENV{REQUEST_URI} = q{/Products/bt-foo.aspx?evil=";system('ls -l');".a +spx};
The solution is to use a more restrictive pattern:
my $in = '/Products/bt-(\w+).aspx';
That something as innocent as using .* in the pattern opens such a big security hole indicates a fundamental problem with the approach.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Using Regexp Patterns as Variables
by Rodster001 (Pilgrim) on Mar 18, 2009 at 20:28 UTC | |
|
Re^7: Using Regexp Patterns as Variables
by kyle (Abbot) on Mar 18, 2009 at 20:03 UTC | |
by ikegami (Patriarch) on Mar 18, 2009 at 21:13 UTC |