Taint functions and $1
Christian Robottom Reis
kiko at async.com.br
Thu Jun 16 18:55:37 UTC 2005
I'm not a Perl wizard, and therefore running into
https://bugzilla.mozilla.org/show_bug.cgi?id=297928
was a surprise for me today. Moral of the story: don't rely on the
value of $1 if the match for something failed; failed matches don't
reset $1. Code that does
$foo =~ /(\d+)/;
$bar = $1;
is buggy for the same reason.
Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3376 0125
More information about the developers
mailing list