[ale] One for the Perl Gurus

fletch at phydeaux.org fletch at phydeaux.org
Tue Jan 10 12:53:23 EST 2006


> I need a good way to sanitize the script other than to do a whole bunch
> of :
>
> $Target =~ s/\./\\./;

perldoc -f quotemeta

That'll automatically do the substitution for any regex metacharacters. 
The problem is that you're basically accepting "code" (in the form of a
regex) from untrusted users.

-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org|  Vincent, you should cease askin'          \ o.O'
                      |  scary questions." -- Jules                =(___)=
                      |                                               U





More information about the Ale mailing list