Bug #23648 » 15860_trunk.diff
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
|
||
// maximum length taken from SMTP RFC 5321
|
||
if (strlen($email) > 254) {
|
||
return FALSE;
|
||
}
|
||
return (filter_var($email, FILTER_VALIDATE_EMAIL) !== FALSE);
|
||
}
|
||
/**
|