justsomeone wrote: [there exists the issue of] spambots using your mail form to send their spam. The sad fact is that they may not just be sending it to you. They may be using email injection to send the mail to lots and lots of innocent users. They could be "bcc'ed" on the form and you would never know... unless you check your mail logs.
You need to lock down your mail form.
hello there! this issue above is the one i'm truly concerned with. i've been in the habit of not putting my e-mail address on my web sites, but only using forms to send w/ mail(), but i realized the hard way this past weekend that indeed i was only part of the way there in terms of security when i suddenly saw all kinds of spam coming from my domain name.
a similar thing happened to me once before which, now that i've learned about this spamtacular technique, i wonder what method was actually used to hijack my dns's sendmail the first time it happened to me-- (would that be what's going on?-- i mean- the proper way to reference what's happening in justsomeone's scenario i've quoted? is that my dns's sendmail, or my "hosting provider's" sendmail-- is that one and the same? uh...). not to get too far off-track here, but the first i fell victim to this exploit was back before i knew any php... might have had some cfmail stuff going on, but i don't even recall exactly how coldfusion does it... more like a perl cgi form, i think... only no need for the perl and... anyway-- all i know is that i got every name in the book sending from user@mydomain.com-- but i resolved, some several MONTHS later, when i discovered that i was a victim of SQL INJECTION in my phpbb2, that perhaps someone was making use of Cross Site Scripting (XSS) to manipulate my my server.
blah, blah-- so many darn things to worry about-- and here i was just looking for some javascript / regular expression (always one and the same, no?) form validator scripts, and then, in a typical 70% impulse-power-Jim moment, i realized that javascript isn't the answer either because if it's disabled, then the form gets submitted regardless!
i beg your pardon if this is redundant (considering justs.'s link above, which i have yet to read), but what IS the best way-- realizing that there's almost always some workaround-- to make secure one's html text field and textarea forms-- especially if those forms are going to subject our db's to SQL injection-- which in my opinion is the gravest personal danger due to potential for XSS if the right sequence of characters are submitted via $POST, or even worse, $GET
disclaimer: i'm a newbie (relatively speaking), so if you want to assume that i know it already, instead, assume that i don't know it yet-- might have heard of it-- but my experience is limited. thanks so much, y'all*!
(y'all: an abbreviation for the plural "You", indicitive of US Americans of the Southern states, and those who, attempting to 'sound hip-hop', use it when they be gettin' funky, chillin' wit da G's, tippin' 40's to their homey's and such)