summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-08-17 15:37:04 +0200
committerAleksander Machniak <alec@alec.pl>2012-08-17 15:37:04 +0200
commitc83b83eeae9806cb60ea3f41f2cff055b0c6ed7e (patch)
treec3a956f701be94ff9cc4bb335abc1ded478305d0 /program
parentc72325faed3d244170650a1bf62ddca6eb1b5fa9 (diff)
Fix domain part check in email address validation function. Added test cases.
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_utils.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/program/include/rcube_utils.php b/program/include/rcube_utils.php
index d1a8315ec..9f18b79c4 100644
--- a/program/include/rcube_utils.php
+++ b/program/include/rcube_utils.php
@@ -110,6 +110,11 @@ class rcube_utils
}
}
+ // last domain part
+ if (preg_match('/[^a-zA-Z]/', array_pop($domain_array))) {
+ return false;
+ }
+
$rcube = rcube::get_instance();
if (!$dns_check || !$rcube->config->get('email_dns_check')) {