]> granicus.if.org Git - php/commitdiff
- Fixed the validate email filter so that the letter "v" can also be used in
authorDerick Rethans <derick@php.net>
Wed, 20 Dec 2006 14:39:01 +0000 (14:39 +0000)
committerDerick Rethans <derick@php.net>
Wed, 20 Dec 2006 14:39:01 +0000 (14:39 +0000)
  the user part of the email address. (Derick)

NEWS
ext/filter/logical_filters.c

diff --git a/NEWS b/NEWS
index 2bad00e03eacf37bc6b66de0e845c8c9cd540d1c..7553cdf473778ac8a0b01766ff72e52e7f749fc5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,7 +10,9 @@ PHP                                                                        NEWS
   . canary protection (debug build only)
   . random generation of cookies and canaries
 - Fixed incorrect function names on FreeBSD where inet_pton() was named
-  __inet_pton() and inet_ntop() was named __inet_ntop() (Hannes)
+  __inet_pton() and inet_ntop() was named __inet_ntop(). (Hannes)
+- Fixed the validate email filter so that the letter "v" can also be used in
+  the user part of the email address. (Derick)
 
 - Fixed bug #39869 (safe_read does not initialize errno).
   (michiel at boland dot org, Dmitry)
index 7596108f09e3b26e8a99c88cb9fa6937b8ae7f84..e231a3ed43e466ff2b6676766b08c3f5ad912b1f 100644 (file)
@@ -501,7 +501,7 @@ void php_filter_validate_url(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
 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\\v\\b]+\\\")|([\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+(\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+)*))@((\\[(((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-z\\-]+))$/";
+       const char regexp[] = "/^((\\\"[^\\\"\\f\\n\\r\\t\\b]+\\\")|([\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+(\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+)*))@((\\[(((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-z\\-]+))$/";
 
        pcre       *re = NULL;
        pcre_extra *pcre_extra = NULL;