Permalink
Browse files

- Add possibility to do LDAP bind before searching for bind DN.

  In deployments where anonymous binds to and/or searches on an LDAP tree are not
  allowed, and where the LDAP address book(s) have been configured to use the
  user-specific bind credentials, rcube_ldap.php needs to bind using service
  credentials in order to be able to find the user's bind dn.
  • Loading branch information...
alecpl committed Nov 30, 2011
1 parent 5587b34 commit 2d08ec91ca8fb429da389b3107f3982565e8ca3b
Showing with 8 additions and 0 deletions.
  1. +1 −0 CHANGELOG
  2. +3 −0 config/main.inc.php.dist
  3. +4 −0 program/include/rcube_ldap.php
View
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
+- Add possibility to do LDAP bind before searching for bind DN
- Fix handling of empty <U> tags in HTML messages (#1488225)
- Add content filter for embedded attachments to protect from XSS on IE (#1487895)
- Use strpos() instead of strstr() when possible (#1488211)
View
@@ -545,6 +545,9 @@ $rcmail_config['ldap_public']['Verisign'] = array(
// The login name is used to search for the DN to bind with
'search_base_dn' => '',
'search_filter' => '', // e.g. '(&(objectClass=posixAccount)(uid=%u))'
+ // DN and password to bind as before searching for bind DN, if anonymous search is not allowed
+ 'search_bind_dn' => '',
+ 'search_bind_pw' => '',
// Default for %dn variable if search doesn't return DN value
'search_dn_default' => '',
// Optional authentication identifier to be used as SASL authorization proxy
@@ -236,6 +236,10 @@ private function _connect()
$replaces = array('%dn' => '', '%dc' => $dc, '%d' => $d, '%fu' => $fu, '%u' => $u);
if ($this->prop['search_base_dn'] && $this->prop['search_filter']) {
+ if (!empty$this->prop['search_bind_dn']) && !empty($this->prop['search_bind_pw'])) {
+ $this->bind($this->prop['search_bind_dn'], $this->prop['search_bind_pw']);
+ }
+
// Search for the dn to use to authenticate
$this->prop['search_base_dn'] = strtr($this->prop['search_base_dn'], $replaces);
$this->prop['search_filter'] = strtr($this->prop['search_filter'], $replaces);

0 comments on commit 2d08ec9

Please sign in to comment.