#48798 [Opn->Bgs]: FILTER_VALIDATE_EMAIL pass the illness email

From: Date: Sat, 04 Jul 2009 16:06:02 +0000
Subject: #48798 [Opn->Bgs]: FILTER_VALIDATE_EMAIL pass the illness email
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-139255@lists.php.net to get a copy of this message
ID: 48798 Updated by: rasmus@php.net Reported By: yanleech at gmail dot com -Status: Open +Status: Bogus Bug Type: Filter related Operating System: Ubuntu 9.04 PHP Version: 5.2.10 New Comment: Trailing dots are perfectly valid in domain names. Try these, for example: http://www.php.net./ http://www.google.com./ http://www.yahoo.com./ Now, some mail servers may reject an email sent to an address with a trailing dot, but others have no problems with them. We have no way of knowing which mail servers accept them. Previous Comments: ------------------------------------------------------------------------ [2009-07-04 14:11:43] yanleech at gmail dot com Description: ------------ I do some filtering like: filter_var($var, FILTER_VALIDATE_EMAIL); and the email blah@blah.com. can be passed; and that must be a invalid email address cause no domain end with .(dot). Reproduce code: --------------- $var = 'blah@blah.com.'; echo (filter_var($var, FILTER_VALIDATE_EMAIL) === false) ? 'error':'passed'; Expected result: ---------------- error Actual result: -------------- passed ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48798&edit=1

« previous php.bugs (#139255) next »