Fix parsing ldap URI for cases where hostname is non-empty

pull/280/head
Aleksander Machniak 10 years ago
parent b7048d8d2d
commit 5bb2fe27a0

@ -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];

Loading…
Cancel
Save