]> granicus.if.org Git - php/commitdiff
MFB: Fixed bug #47598 (FILTER_VALIDATE_EMAIL is locale aware)
authorIlia Alshanetsky <iliaa@php.net>
Sun, 8 Mar 2009 18:22:26 +0000 (18:22 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 8 Mar 2009 18:22:26 +0000 (18:22 +0000)
NEWS
ext/filter/logical_filters.c

diff --git a/NEWS b/NEWS
index 7fb5768e31066cfa09e7edddfa34da3f17d5a5c1..1c1464016c5f936b8b159f332839ee5635807eb9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,10 +3,11 @@ PHP                                                                        NEWS
 ?? ??? 2009, PHP 5.2.10
 - Fixed memory corruptions while reading properties of zip files. (Ilia)
 
-- Fixed bug #47546 (Default value for limit parameter in explode is 0, 
- not -1). (Kalle)
+- Fixed bug #47598 (FILTER_VALIDATE_EMAIL is locale aware). (Ilia)
+- Fixed bug #47546 (Default value for limit parameter in explode is 0, not -1).
+  (Kalle)
 - Fixed bug #47435 (FILTER_FLAG_NO_PRIV_RANGE does not work with ipv6
- addresses in the filter extension). (Ilia)
 addresses in the filter extension). (Ilia)
 
 26 Feb 2009, PHP 5.2.9
 - Changed __call() to be invoked on private/protected method access, similar to
index 6074af0e2088dc75ea0f2608e5502c474274286d..450b5bbbf3ff6f471930e85f64996fe50e2bbd7d 100644 (file)
@@ -469,7 +469,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\\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-z0-9\\-])*([A-Za-z0-9]))?\\.?)+[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-z\\-]*))$/D";
 
        pcre       *re = NULL;
        pcre_extra *pcre_extra = NULL;