* Removed the troublesome regular expression in isValidEmailAddr which returns
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sat, 23 Apr 2005 21:20:09 +0000 (21:20 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sat, 23 Apr 2005 21:20:09 +0000 (21:20 +0000)
  true now no matter what input it gets, see bug 959.

includes/User.php

index 4775713..ae3d43d 100644 (file)
@@ -118,11 +118,17 @@ class User {
 
        /**
         * does the string match roughly an email address ?
+        *
+        * @bug 959
+        *
         * @param string $addr email address
         * @static
+        * @return bool
         */
        function isValidEmailAddr ( $addr ) {
-               return preg_match( '/^([a-z0-9_.-]+([a-z0-9_.-]+)*\@[a-z0-9_-]+([a-z0-9_.-]+)*([a-z.]{2,})+)$/', strtolower($addr));
+               # There used to be a regular expression here, it got removed because it
+               # rejected valid addresses.
+               return true;
        }
 
        /**