|
Web Contractors Web Developer Jobs Join Us / Log in Discussion |
hijack
Check for header injection attack and spam in your php form script
Submitted by rimian on Sun, 07/22/2007 - 04:58I wrote this to check for header injection attempts when processing a form that sends an email with php. (and I'll put it here so I can find it)
function is_spam( $message, $threshold = 1 ){
return _count_spam_body($message, $threshold) >= $threshold;
}
function _count_spam_body( $message, $threshold = 1 ){
$message = trim(strtolower($message));
//check the body of the message for spam or header injection attempts
$matches_bad = array(
"bcc:",
"cc:",
"to:",
"content-type:",
"mime-version:",
"multipart/mixed",
New forum topics
- [MELB] Web Developer | Web Designer | Graphic Designer | Marketing Manager
- Open Source Online Invoicing Software
- Professional Drupal Consulting, Design & Development Services in Australia
- New Year Speacial-Professional Website for 400$ with doamin+Host
- Ruby on Rails Oceana
- WebDev/Design/Research/Consultant - PHP/MySql, Javascript, Joomla, HTML, Flash, AJAX
- Freelance ASP.NET Developer
- System Monitoring with Nagios
- Learning Ruby? What about the RubyMentor Project?
- Need a team
- JAOO Sydney/Brisbane 2009
- Get Your Business a Website for $399 ONLY !!!
- Concrete5: Another CMS!
- Manage The Cloud with Amazon Web Services
- Crystal Reports developer needed

