I am looking for your ideas on making a mailing script (for example a contact form) secure from exploits and spam usage without the use of SSL.
I have integrated the following into my scripts and so far I haven't had any problems but I feel there are other steps to take that I haven't thought of yet.
1) Referer checker (I know this isn't a GREAT way to do anything as it can be faked, but it's better than nothing and it's checked per domain)
2) All collected form fields that are used in the email are stripped out of email addresses. The email address field is broken by a comma, space or semicolon (any combination) and all extra addresses found are stripped. I know there are emails with commas in them but there aren't enough of those to worry about-- I've never come across one.
3) IP usage timer. When they send a message, they get logged into my MySQL database with a timestamp. Each time the script is initiated, it checks their IP address against the timestamp if it's found and will terminate the script if it's used more than once per 30 minutes. This helps ensure bots don't keep sending in data.
4) I have NOT done this but I was planning on setting up a script that pulls out A,B,C,D. Either one or more of them (but of course only one of each). Then the user has to check THAT/THOSE checkboxes. If the wrong ones are slected or the right ones not selected, the script will terminate.
Do you have any other ideas/suggestions on ways to prevent mailing scripts from being attacked?
I have integrated the following into my scripts and so far I haven't had any problems but I feel there are other steps to take that I haven't thought of yet.
1) Referer checker (I know this isn't a GREAT way to do anything as it can be faked, but it's better than nothing and it's checked per domain)
2) All collected form fields that are used in the email are stripped out of email addresses. The email address field is broken by a comma, space or semicolon (any combination) and all extra addresses found are stripped. I know there are emails with commas in them but there aren't enough of those to worry about-- I've never come across one.
3) IP usage timer. When they send a message, they get logged into my MySQL database with a timestamp. Each time the script is initiated, it checks their IP address against the timestamp if it's found and will terminate the script if it's used more than once per 30 minutes. This helps ensure bots don't keep sending in data.
4) I have NOT done this but I was planning on setting up a script that pulls out A,B,C,D. Either one or more of them (but of course only one of each). Then the user has to check THAT/THOSE checkboxes. If the wrong ones are slected or the right ones not selected, the script will terminate.
Do you have any other ideas/suggestions on ways to prevent mailing scripts from being attacked?