P is for Practical | |
PerlMonks |
Re: Simple Email Scriptby mrbbking (Hermit) |
on Mar 07, 2002 at 21:14 UTC ( [id://150132]=note: print w/replies, xml ) | Need Help?? |
You should use Taint mode in your CGI scripts and check all input for dangerous things before using it. Suggestion: Change your shebang line to enable warnings and Taint mode, like this: #!/usr/bin/perl -wT And then check all your input with regexes (un-taint it) to be sure that there's nothing scary in there. The particular regex I used may not meet your needs, and sanitizing the other pieces may be more difficult, but this is the general idea I think you'll want. Oh, to reply more to the question you actually asked - add this: "use CGI::Carp( 'fatalsToBrowser' );" to your script while you're debugging. Then you'll get a better description than "HTTP 500" when things go wrong. Good luck!
In Section
Seekers of Perl Wisdom
|
|