Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Can someone help me write a regex that for the email address field will substitute anything after a SPACE or a COMMA will be removed before it gets stored to file? I figure if I remove both of these, it doesn't matter what the person tries to put in as their email address, it'll simply be lost. (unless you know of better ways?)
Another problem is, I'm using your basic sendmail mail script To: $adminmail From: $usermail Subject: $subject.. print mail "$message".... Since each of these fields are being processed through the mail script, I have the feeling they could screw up the script with ANY one of these fields. I can't break on SPACES for the name and address fields as they require spaces between the first and last name. Any ideas on what to do about these? I have -t on with sendmail, so hopeully that is doing something.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: preventing malicious mail attacks
by blue_cowdawg (Monsignor) on Feb 01, 2004 at 18:43 UTC | |
| |
|
Re: preventing malicious mail attacks
by CountZero (Bishop) on Feb 01, 2004 at 18:50 UTC | |
by Anonymous Monk on Feb 01, 2004 at 19:04 UTC | |
by CountZero (Bishop) on Feb 01, 2004 at 19:24 UTC | |
by Anonymous Monk on Feb 01, 2004 at 19:29 UTC | |
by CountZero (Bishop) on Feb 01, 2004 at 19:42 UTC | |
| |
|
Re: preventing malicious mail attacks
by CountZero (Bishop) on Feb 01, 2004 at 19:05 UTC | |
|
Re: preventing malicious mail attacks
by ysth (Canon) on Feb 01, 2004 at 21:59 UTC | |
|
Re: preventing malicious mail attacks
by Roger (Parson) on Feb 01, 2004 at 23:51 UTC |