summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-09-20 15:39:42 +0200
committerAleksander Machniak <alec@alec.pl>2013-09-20 15:39:42 +0200
commit2b8f477c86f56cb23cced480779a40ff5443433d (patch)
tree0b33b5039c07df7e680eb52e3cb4661e45f293ce /lib
parent69ef0de8ffd1460ebba165fc7210034b3235a791 (diff)
downloadwebadmin-2b8f477c86f56cb23cced480779a40ff5443433d.tar.gz
Email address validation for field with validate=simple validates
only address syntax, domain checks are skipped (Bug #1138)
Diffstat (limited to 'lib')
-rw-r--r--lib/api/kolab_api_service_form_value.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/api/kolab_api_service_form_value.php b/lib/api/kolab_api_service_form_value.php
index 1e4b044..bd8256d 100644
--- a/lib/api/kolab_api_service_form_value.php
+++ b/lib/api/kolab_api_service_form_value.php
@@ -1103,6 +1103,10 @@ class kolab_api_service_form_value extends kolab_api_service
throw new Exception("Invalid email address '$mail_address'", 692);
}
+ if ($validation_type == self::VALIDATE_BASIC) {
+ continue;
+ }
+
// Only validate the 'alias' attribute is in any of my domain name
// spaces if indeed it is listed as a mail attribute.
if (in_array('alias', $conf->get_list('mail_attributes'))) {
@@ -1111,7 +1115,6 @@ class kolab_api_service_form_value extends kolab_api_service
}
}
}
-
}
private function validate_associateddomain($value, $postdata = array(), $validation_type = null)
@@ -1160,6 +1163,10 @@ class kolab_api_service_form_value extends kolab_api_service
throw new Exception("Invalid email address '$mail_address'", 692);
}
+ if ($validation_type == self::VALIDATE_BASIC) {
+ continue;
+ }
+
// Only validate the 'mail' attribute is in any of my domain name
// spaces if indeed it is listed as a mail attribute.
if (in_array('mail', $conf->get_list('mail_attributes'))) {
@@ -1197,6 +1204,10 @@ class kolab_api_service_form_value extends kolab_api_service
throw new Exception("Invalid email address '$mail_address'", 692);
}
+ if ($validation_type == self::VALIDATE_BASIC) {
+ continue;
+ }
+
// Only validate the 'mailalternateaddress' attribute is in any of my domain name
// spaces if indeed it is listed as a mail attribute.
if (in_array('mailalternateaddress', $conf->get_list('mail_attributes'))) {