iliaa           Sun Jul  5 16:08:06 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/filter/tests   016.phpt 
    /php-src/ext/filter logical_filters.c 
    /php-src    NEWS 
  Log:
  MFB: Fixed bug #48718 (FILTER_VALIDATE_EMAIL does not allow numbers in domain 
 
  components).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/016.phpt?r1=1.4.2.4.2.1&r2=1.4.2.4.2.2&diff_format=u
Index: php-src/ext/filter/tests/016.phpt
diff -u php-src/ext/filter/tests/016.phpt:1.4.2.4.2.1 
php-src/ext/filter/tests/016.phpt:1.4.2.4.2.2
--- php-src/ext/filter/tests/016.phpt:1.4.2.4.2.1       Mon Feb  2 23:50:31 2009
+++ php-src/ext/filter/tests/016.phpt   Sun Jul  5 16:08:05 2009
@@ -14,7 +14,8 @@
 '@',   
 '[]()/@example.com',   
 'qwertyuiopasdfghjklzxcv...@qwertyuiopasdfghjklzxcvbnm.net',
-'e.x.a.m.p.l...@example.com'
+'e.x.a.m.p.l...@example.com',
+'firstname.lastn...@employee.2something.com'
 );
 foreach ($values as $value) {
        var_dump(filter_var($value, FILTER_VALIDATE_EMAIL));
@@ -33,4 +34,5 @@
 bool(false)
 string(57) "qwertyuiopasdfghjklzxcv...@qwertyuiopasdfghjklzxcvbnm.net"
 string(26) "e.x.a.m.p.l...@example.com"
+string(42) "firstname.lastn...@employee.2something.com"
 Done
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/logical_filters.c?r1=1.1.2.22.2.12&r2=1.1.2.22.2.13&diff_format=u
Index: php-src/ext/filter/logical_filters.c
diff -u php-src/ext/filter/logical_filters.c:1.1.2.22.2.12 
php-src/ext/filter/logical_filters.c:1.1.2.22.2.13
--- php-src/ext/filter/logical_filters.c:1.1.2.22.2.12  Wed Jun 10 19:01:17 2009
+++ php-src/ext/filter/logical_filters.c        Sun Jul  5 16:08:05 2009
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: logical_filters.c,v 1.1.2.22.2.12 2009/06/10 19:01:17 felipe Exp $ */
+/* $Id: logical_filters.c,v 1.1.2.22.2.13 2009/07/05 16:08:05 iliaa Exp $ */
 
 #include "php_filter.h"
 #include "filter_private.h"
@@ -472,7 +472,7 @@
 void php_filter_validate_email(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
 {
        /* From 
http://cvs.php.net/co.php/pear/HTML_QuickForm/QuickForm/Rule/Email.php?r=1.4 */
-       const char regexp[] = 
"/^((\\\"[^\\\"\\f\\n\\r\\t\\b]+\\\")|([A-Za-z0-9_\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+(\\.[A-Za-z0-9_\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]*)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9])(([A-Za-z0-9\\-])*([A-Za-z0-9]))?(\\.(?=[A-Za-z\\-]))?)+[A-Za-z\\-]*))$/D";
+       const char regexp[] = 
"/^((\\\"[^\\\"\\f\\n\\r\\t\\b]+\\\")|([A-Za-z0-9_\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+(\\.[A-Za-z0-9_\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]*)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9])(([A-Za-z0-9\\-])*([A-Za-z0-9]))?(\\.(?=[A-Za-z0-9\\-]))?)+[A-Za-z\\-]*))$/D";
 
        pcre       *re = NULL;
        pcre_extra *pcre_extra = NULL;
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.662&r2=1.2027.2.547.2.965.2.663&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.662 
php-src/NEWS:1.2027.2.547.2.965.2.663
--- php-src/NEWS:1.2027.2.547.2.965.2.662       Thu Jul  2 13:42:16 2009
+++ php-src/NEWS        Sun Jul  5 16:08:05 2009
@@ -8,6 +8,8 @@
 - Fixed bug #48757 (ReflectionFunction::invoke() parameter issues). (Kalle)
 - Fixed bug #48733 (CURLOPT_WRITEHEADER|CURLOPT_FILE|CURLOPT_STDERR warns on
   files that have been opened with r+). (Ilia)
+- Fixed bug #48718 (FILTER_VALIDATE_EMAIL does not allow numbers in domain  
+  components). (Ilia)
 - Fixed bug #48681 (openssl signature verification for tar archives broken).
   (Greg)
 - Fixed bug #47351 (Memory leak in DateTime). (Derick, Tobias John)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to