I've read dozens of pages on email header injection, including some
from here with
helpful comments, but some of the information I've read is contradictory and I don't know what is true.
That script above says it can be freely modified, so I've modified it to check for post elements and to fail without them (we don't want blank emails) and also to fail if certain fields are empty.
What I'm worried about now, though, is if more information can be added to it to use for spamming people. I haven't had an email injection regex on it because I didn't know about them before
this comment in a recent thread here. I do not want to leave a form up if it can be hijacked.
I've tried modifying the code to put a regex on the field values and to fail if there's a match, but the result is that it properly fails when it should, but doesn't email the results when everything's okay. I'm not sure if the server's flaking out, if the account has been flagged as spammy, or if--more likely--I've nested something improperly. In any case I'm not getting a PHP error, but I thought I'd back up and ask the broader question: is that script safe as-is? (Can I drop this and get on with my weekend?) I'm not finding any discussions about it elsewhere.
posted by hattifattener at 3:45 PM on August 11, 2007