From: Ævar Arnfjörð Bjarmason Date: Sat, 23 Apr 2005 21:20:09 +0000 (+0000) Subject: * Removed the troublesome regular expression in isValidEmailAddr which returns X-Git-Tag: 1.5.0alpha1~167 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=8b37fbcd2e0dcefaabe924ca80512f72b2f1b937;p=lhc%2Fweb%2Fwiklou.git * Removed the troublesome regular expression in isValidEmailAddr which returns true now no matter what input it gets, see bug 959. --- diff --git a/includes/User.php b/includes/User.php index 477571396e..ae3d43df37 100644 --- a/includes/User.php +++ b/includes/User.php @@ -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; } /**