From 8b37fbcd2e0dcefaabe924ca80512f72b2f1b937 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sat, 23 Apr 2005 21:20:09 +0000 Subject: [PATCH] * Removed the troublesome regular expression in isValidEmailAddr which returns true now no matter what input it gets, see bug 959. --- includes/User.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; } /** -- 2.20.1