diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-10-04 11:51:59 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-10-04 11:51:59 +0200 |
commit | e426ae262c22f75ebd403d9f9d32238f7d9a85af (patch) | |
tree | 5f87de3d9fd506de2f6bc26d75de89d8e59bfd71 /program/lib/Roundcube | |
parent | af79a7b837151af793b5bd2788de3635ab96b1e3 (diff) |
Search for user DN only if one of bind_dn, base_dn, groups_base_dn settings
contains %dn variable
Diffstat (limited to 'program/lib/Roundcube')
-rw-r--r-- | program/lib/Roundcube/rcube_ldap.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php index 78573789b..64288f973 100644 --- a/program/lib/Roundcube/rcube_ldap.php +++ b/program/lib/Roundcube/rcube_ldap.php @@ -289,7 +289,9 @@ class rcube_ldap extends rcube_addressbook $replaces = array('%dn' => '', '%dc' => $dc, '%d' => $d, '%fu' => $fu, '%u' => $u); // Search for the dn to use to authenticate - if ($this->prop['search_base_dn'] && $this->prop['search_filter']) { + if ($this->prop['search_base_dn'] && $this->prop['search_filter'] + && (strstr($bind_dn, '%dn') || strstr($this->base_dn, '%dn') || strstr($this->groups_base_dn, '%dn')) + ) { $search_bind_dn = strtr($this->prop['search_bind_dn'], $replaces); $search_base_dn = strtr($this->prop['search_base_dn'], $replaces); $search_filter = strtr($this->prop['search_filter'], $replaces); |