Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
The stupid question is the question not asked
 
PerlMonks  

Secure form mail processing

by btrott (Parson)
on Jul 05, 2001 at 01:36 UTC ( #93953=perlmeditation: print w/ replies, xml ) Need Help??

In this reply, an AM posts that he uses Matt's formmail program so as not to reinvent the wheel. The problem is that this wheel is very broken, and we need a new wheel.

Matt's FormMail has many problems, but one of the biggest is its lack of security. Any instance of FormMail can be used as a spam gateway, because FormMail uses hidden form variables to specify recipient(s) and message subject. Do you want your forms used as spammer tools? Sure, FormMail checks the referrer--but referrers are trivially faked, and this is *not* good enough protection.

We need a good alternative to FormMail. I think (bias) that STAMP can be such an alternative.

I wrote STAMP (Secure, Template-Aware Mail Processor) as a more secure alternative to FormMail. It uses server-side configuration files, so spammers can't use the form as an arbitrary email gateway; it supports all of the options used in FormMail; and it supports the use of templates (using HTML::Template) to customize mail messages sent to the recipient(s) of the form data.

I don't think that STAMP is the only possible alternative, of course, and it's possible that it wouldn't even be the best solution for FormMail users. It requires the use of CPAN modules, for example, which could be a possible turnoff to users who just want a simple form mailer. And it's not even the only alternative (I'm thinking specifically of Not Matt's Scripts, here).

Anyway, it's pretty well documented; it is, I believe, secure, not buggy, etc.; and I like it. :) If anyone wishes to give me a security review, here is the source.

Comment on Secure form mail processing

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://93953]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2014-04-19 05:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (478 votes), past polls