Alexander Nicolaysen =?UTF-8?Q?S=C3=B8rnes=20?=: account: Use PHP's filter_var to validate email address

Alexander Nicolaysen Sørnes asornes at winehq.org
Sun Jan 12 08:57:19 CST 2014


Module: appdb
Branch: master
Commit: c4232cd424f586cd7e98d56a199117e0b2b8a6a4
URL:    http://source.winehq.org/git/appdb.git/?a=commit;h=c4232cd424f586cd7e98d56a199117e0b2b8a6a4

Author: Alexander Nicolaysen Sørnes <alexsornes at gmail.com>
Date:   Sun Jan 12 15:55:39 2014 +0100

account: Use PHP's filter_var to validate email address

---

 account.php |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/account.php b/account.php
index eaeadf2..8ac1baa 100644
--- a/account.php
+++ b/account.php
@@ -90,7 +90,7 @@ function cmd_do_new()
 {
     global $aClean;
 
-    if(!ereg("^.+ at .+\\..+$", $aClean['sUserEmail']))
+    if(!filter_var($aClean['sUserEmail'], FILTER_VALIDATE_EMAIL))
     {
         $aClean['sUserEmail'] = "";
         retry("new", "Invalid email address");




More information about the wine-cvs mailing list