Project

General

Profile

Bug #23648 » 15860_trunk_v1.diff

Administrator Admin, 2010-10-04 23:17

View differences:

t3lib/class.t3lib_div.php (Arbeitskopie)
* @return boolean Returns true if the $email address (input string) is valid
*/
public static function validEmail($email) {
return (filter_var($email, FILTER_VALIDATE_EMAIL) !== false);
// enforce maximum length to prevent libpcre recursion crash bug #52929 in PHP
// fixed in PHP 5.2+ later than Sept 2010; length restriction per SMTP RFC 2821
if (strlen($email) > 320) {
return FALSE;
}
return (filter_var($email, FILTER_VALIDATE_EMAIL) !== FALSE);
}
/**
(4-4/6)