diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-06-25 11:32:11 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-06-25 11:58:13 +0200 |
commit | e686b495a86fd7d1fd537dea56fa9b9e148045f7 (patch) | |
tree | 65c979866c067c220853ee8adad2fb406842cb8e | |
parent | 2131d3cb8b8b12c28efdebe1d288274d84663076 (diff) | |
download | aurweb-e686b495a86fd7d1fd537dea56fa9b9e148045f7.tar.xz |
Stricter email address validation
Use PHP's filter extension to validate mail addresses. The filter
extension is enabled by default as of PHP 5.2.0.
Thanks-to: Florian Pritz <bluewind@xinu.at>
Thanks-to: Cédric Girard <girard.cedric@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rw-r--r-- | 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..73f8fd3 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 (filter_var($addy, FILTER_VALIDATE_EMAIL) !== false); } # a new seed value for mt_srand() |