[aur-dev] [PATCH 2/5] use valid_email() from codeigniter's email helper
Florian Pritz
bluewind at xinu.at
Wed Jun 22 15:36:41 EDT 2011
Signed-off-by: Florian Pritz <bluewind at xinu.at>
---
web/lib/aur.inc.php | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/web/lib/aur.inc.php b/web/lib/aur.inc.php
index 4c2cc55..3250133 100644
--- a/web/lib/aur.inc.php
+++ b/web/lib/aur.inc.php
@@ -78,7 +78,7 @@ function check_sid() {
# verify that an email address looks like it is legitimate
#
function valid_email($addy) {
- return strpos($addy, '@');
+ return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $addy)) ? FALSE : TRUE;
}
# a new seed value for mt_srand()
--
1.7.5.4
More information about the aur-dev
mailing list