in reply to Removing Headers in Perl
The big problem in your program is that you are accepting untrusted user input and pass that on to the sendmail program. You will need to make sure that the $fromEmail, $formSubject, $dateFormat, $fromName, $remoteHost, $remoteAddress, and the $ENV{'HTTP_USER_AGENT'] all are well-formed and especially do not contain newlines.
Personally, I would reject anything that contains a character outside of [\x20-\x7f], but that might preclude people with accents in their name.
Have you looked at the safer and well-maintained offerings from the NMS Posse ? They also have a form mailer, which might be what you need.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Removing Headers in Perl
by North323 (Initiate) on Nov 11, 2007 at 20:54 UTC | |
by Corion (Patriarch) on Nov 11, 2007 at 21:25 UTC | |
by North323 (Initiate) on Nov 11, 2007 at 21:37 UTC | |
by Corion (Patriarch) on Nov 11, 2007 at 21:44 UTC | |
by aquarium (Curate) on Nov 12, 2007 at 02:34 UTC |