in reply to Re: Re: Re: the search string and me
in thread the search string and me
I think you take the wrong approach to interaction on the internet: Your users should never be regarded as crazy, deranged or plain curious, but as malicious. And yes, I do think that overwriting a global value can have severe effects. But you use eval to set that string. So if I would craft a query parameter named [system q(rm -rf /)], that code would be executed by your eval statement.
You could do some dereferencing via a hash to fill the variable with the parameter to get around the eval statement, but let's face it - CGI.pm and its cousins already do that and in a tried and tested way.
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: the search string and me
by wolis (Scribe) on Sep 16, 2003 at 00:48 UTC | |
by bart (Canon) on Sep 19, 2003 at 03:28 UTC | |
by wolis (Scribe) on Sep 22, 2003 at 02:57 UTC | |
by bart (Canon) on Sep 22, 2003 at 07:03 UTC | |
by wolis (Scribe) on Sep 23, 2003 at 05:02 UTC |