summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Auth/LDAP.php4
-rw-r--r--lib/api/kolab_api_service_form_value.php9
2 files changed, 8 insertions, 5 deletions
diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index aac6df8..9d0b014 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -1135,7 +1135,9 @@ class LDAP extends Net_LDAP3 {
// LDAP3 search parameters
$opts = array(
'search' => $search,
- 'sort' => $params['sort_by'], // for VLV
+ // T409349: Remove the 'sort' parameter to use default VLV sorting
+ // If the param value is not the same as in VLV, search will not use the index.
+ // 'sort' => $params['sort_by'], // for VLV
);
$result = $this->search_entries($base_dn, $filter, $scope, $attributes, $opts);
diff --git a/lib/api/kolab_api_service_form_value.php b/lib/api/kolab_api_service_form_value.php
index 2edee57..568c3b2 100644
--- a/lib/api/kolab_api_service_form_value.php
+++ b/lib/api/kolab_api_service_form_value.php
@@ -1654,6 +1654,7 @@ class kolab_api_service_form_value extends kolab_api_service
}
}
+ $domains = array_map('strtolower', $domains);
$domains = array_unique($domains);
Log::trace("_get_valid_domains result: " . var_export($domains, true));
@@ -1666,10 +1667,11 @@ class kolab_api_service_form_value extends kolab_api_service
$at_index = strrpos($mail_address, "@");
if (is_bool($at_index) && !$at_index) {
throw new Exception("Invalid email address: No domain name space", 235);
- } else {
- $email_domain = substr($mail_address, $at_index+1);
}
+ $email_domain = substr($mail_address, $at_index + 1);
+ $email_domain = strtolower($email_domain);
+
$my_primary_domain = $_SESSION['user']->get_domain();
if ($email_domain == $my_primary_domain) {
@@ -1677,7 +1679,7 @@ class kolab_api_service_form_value extends kolab_api_service
return true;
}
- $valid = false;
+ $valid = false;
Log::trace("_validate_email_address_in_any_of_mydomains(\$mail_address = " . var_export($mail_address, TRUE) . ")");
if (in_array($email_domain, $this->_get_valid_domains($my_primary_domain))) {
@@ -1692,5 +1694,4 @@ class kolab_api_service_form_value extends kolab_api_service
return $valid;
}
-
}