summaryrefslogtreecommitdiff
path: root/program/lib
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2015-02-27 10:06:30 +0100
committerAleksander Machniak <alec@alec.pl>2015-02-27 10:06:30 +0100
commit5aa1d2005bb01f9f7f6bb2275dc467f7b7b368f4 (patch)
treee1de9628ca0539e7b81d84a303f8968df99f1742 /program/lib
parent759566fe99fe1fcf2857afc51d0b343b67aa4d44 (diff)
Fix parsing ldap URI for cases where hostname is non-empty
Diffstat (limited to 'program/lib')
-rw-r--r--program/lib/Roundcube/rcube_ldap.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php
index 13d55bde6..87dcb2bf9 100644
--- a/program/lib/Roundcube/rcube_ldap.php
+++ b/program/lib/Roundcube/rcube_ldap.php
@@ -698,8 +698,9 @@ class rcube_ldap extends rcube_addressbook
for ($i=0; $i < $entry['memberurl']['count']; $i++) {
// extract components from url
- if (!preg_match('!ldap:///([^\?]+)\?\?(\w+)\?(.*)$!', $entry['memberurl'][$i], $m))
+ if (!preg_match('!ldap://[^/]*/([^\?]+)\?\?(\w+)\?(.*)$!', $entry['memberurl'][$i], $m)) {
continue;
+ }
// add search filter if any
$filter = $this->filter ? '(&(' . $m[3] . ')(' . $this->filter . '))' : $m[3];