I'd appreciate hearing (reading!) people's thoughts on making web form
data safe for using to compose an email via sendmail.
Basically, see comments in pseudo-code below, what should I be doing to
the data to make it safe?
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
use strict;
use CGI;
my $query = new CGI;
my $example_data = $query->param('some_form_item');
## What should I be doing to $example_data to make it safe??
my $sendmail = '/usr/lib/sendmail';
open (SENDMAIL, "|$sendmail $webmaster") || die "Can't open $sendmail!\n";
# Etc.
print SENDMAIL $example_data . "\n";
print SENDMAIL ".\n";
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Thanks in advance,
Nigel
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/