in reply to Regex Grumblings (Variable Interpolation)
My question is: Why is the regexp compiler lenient enough to recognize $bar straight out as a variable reference, but one level removed (via $foo) and it will not operate?This is a Good Thing from a security perspective.
Suppose you had a place for me to type a regex on a web form. So it shows up in a Perl variable, which you interpet dynamically as above. If I learn of that, I merely enter $foo[`evil command`] for my regex, and I've now haxored your system.
No, the present system must stay. It's the only way to ensure no "double-level" of interpretation, an absolute requirement for security.
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex Grumblings (Variable Interpolation)
by tadman (Prior) on May 23, 2001 at 19:54 UTC | |
by chipmunk (Parson) on May 23, 2001 at 23:22 UTC |