in reply to avoid by pass of web interface
First is QUERY_STRING; perl's CGI module uses this to get param information, but it will also by default look on the command line or STDIN. Turn this off with "use CGI -no_debug;" and verify that parameters you expect are present.
Verify that $ENV{REQUEST_METHOD} is GET or POST (whichever your form specified). It's also available from the CGI module as request_method(); other variables are similarly available - see CGI.
Check that HTTP_REFERER (sic) is the page containing your form.
That should stop most casual attempts to run your script. You can also set permissions so that only the user the webserver runs as has access to the script.
To further secure things, use a captcha image on your form page and/or a session (via cookie, parameter, or path).
|
|---|