This patch check the email address for more criteria.
>From 8b6eeea240bb6b9a466c0f7a53bc2c332fb57451 Mon Sep 17 00:00:00 2001
From: Viktor Leonhardt <[email protected]´>
Date: Wed, 29 Sep 2010 13:51:50 +0000
Subject: [PATCH] adding better validation of emailadress
---
web/lib/aur.inc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/web/lib/aur.inc b/web/lib/aur.inc
index bd69c4c..583006c
--- a/web/lib/aur.inc
+++ b/web/lib/aur.inc
@@ -83,7 +83,7 @@ function check_sid() {
# verify that an email address looks like it is legitimate
#
function valid_email($addy) {
- return strpos($addy, '@');
+ return
eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*...@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$",
$addy);
}
# a new seed value for mt_srand()
--
1.7.3