summaryrefslogtreecommitdiff
path: root/plugins/password/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/password/drivers')
-rw-r--r--plugins/password/drivers/domainfactory.php10
-rw-r--r--plugins/password/drivers/ldap.php2
-rw-r--r--plugins/password/drivers/ldap_simple.php6
3 files changed, 11 insertions, 7 deletions
diff --git a/plugins/password/drivers/domainfactory.php b/plugins/password/drivers/domainfactory.php
index 6e1219869..4dbf4b799 100644
--- a/plugins/password/drivers/domainfactory.php
+++ b/plugins/password/drivers/domainfactory.php
@@ -54,7 +54,12 @@ class rcube_domainfactory_password
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
if ($result = curl_exec($ch)) {
- // did the new password match the requirements?
+ // has the password been changed?
+ if (strpos($result, 'Einstellungen erfolgreich') !== false) {
+ return PASSWORD_SUCCESS;
+ }
+
+ // show error message(s) if possible
if (strpos($result, '<div class="d-msg-text">') !== false) {
preg_match_all('#<div class="d-msg-text">(.*?)</div>#s', $result, $errors);
if (isset($errors[1])) {
@@ -66,9 +71,6 @@ class rcube_domainfactory_password
}
}
- if (strpos($result, 'Einstellungen erfolgreich') !== false) {
- return PASSWORD_SUCCESS;
- }
} else {
return PASSWORD_CONNECT_ERROR;
diff --git a/plugins/password/drivers/ldap.php b/plugins/password/drivers/ldap.php
index cf62debcf..739958ad7 100644
--- a/plugins/password/drivers/ldap.php
+++ b/plugins/password/drivers/ldap.php
@@ -146,7 +146,7 @@ class rcube_ldap_password
return '';
}
- $base = $rcmail->config->get('password_ldap_search_base');
+ $base = self::substitute_vars($rcmail->config->get('password_ldap_search_base'));
$filter = self::substitute_vars($rcmail->config->get('password_ldap_search_filter'));
$options = array (
'scope' => 'sub',
diff --git a/plugins/password/drivers/ldap_simple.php b/plugins/password/drivers/ldap_simple.php
index c5d828fab..3e167ea5b 100644
--- a/plugins/password/drivers/ldap_simple.php
+++ b/plugins/password/drivers/ldap_simple.php
@@ -113,7 +113,7 @@ class rcube_ldap_simple_password
return PASSWORD_CRYPT_ERROR;
}
- $this->_debug("C: Bind $binddn [pass: $bindpw]");
+ $this->_debug("C: Bind $binddn, pass: **** [" . strlen($bindpw) . "]");
// Bind
if (!ldap_bind($ds, $binddn, $bindpw)) {
@@ -175,7 +175,7 @@ class rcube_ldap_simple_password
return null;
}
- $this->_debug("C: Bind $search_user [pass: $search_pass]");
+ $this->_debug("C: Bind $search_user, pass: **** [" . strlen($search_pass) . "]");
// Bind
if (!ldap_bind($ds, $search_user, $search_pass)) {
@@ -187,6 +187,8 @@ class rcube_ldap_simple_password
$search_base = $rcmail->config->get('password_ldap_search_base');
$search_filter = $rcmail->config->get('password_ldap_search_filter');
+
+ $search_base = rcube_ldap_password::substitute_vars($search_base);
$search_filter = rcube_ldap_password::substitute_vars($search_filter);
$this->_debug("C: Search $search_base for $search_filter");