Aleksander Machniak
2013-10-14 c1bc8f6c827a27540b5510b42dcc65b39d38f2c1
program/lib/Roundcube/rcube_ldap.php
@@ -34,6 +34,7 @@
    public $ready       = false;
    public $group_id    = 0;
    public $coltypes    = array();
    public $export_groups = false;
    // private properties
    protected $ldap;
@@ -288,7 +289,9 @@
                $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);