Jump to content

email field help(sanitization fail)


darkfreaks

Recommended Posts

okay so i have a slight problem. i have been testing my form with fake emails if i put something like [email protected] in my email field i get an email with

 

From : [email protected]

 

i do have a function called clean_string() that weeds out  the following

 

 

href|bcc|cc|to:|content-type

 

can i add to this to weed something like this out?

 

i already am using  filter_vars validate_email filter and regex ontop of this and it is still happening.

Link to comment
https://forums.phpfreaks.com/topic/228868-email-field-helpsanitization-fail/
Share on other sites

i have since used this to help but i think it only removes all XSS injection from the form.

$email_from = clean_string($purifier->purify($_POST['email_from']));

 

but it does not stop header injection completely.

 

if i enter the above email i get

Reply-To: [email protected]

From: [email protected]

sent from: host.cheatordie.com

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.