Hello,
When compose calls the LDAP search function (to build the auto-complete list) it passes an empty '$value' parameter. In this case, when all the bits of the filter get concatenated you end up with something like this:
(|(mail=**)(cn=**))
which isn't valid syntax (at least it's not on my LDAP server).
Here's a tiny patch to rcube_ldap.inc that eliminates the double wildcards. There may be a better way to do it, but this was simple.
Cheers, Roy
When compose calls the LDAP search function (to build the auto-complete
list) it passes an empty '$value' parameter. In this case, when all the
bits of the filter get concatenated you end up with something like this:(|(mail=**)(cn=**))
which isn't valid syntax (at least it's not on my LDAP server).
Here's a tiny patch to rcube_ldap.inc that eliminates the double
wildcards. There may be a better way to do it, but this was simple.
I can confirm that your patch works properly.
I've extended it to also fix the general filter problem we discussed some days ago:
--- program/include/rcube_ldap.inc (revision 1141) +++ program/include/rcube_ldap.inc (working copy) @@ -284,10 +284,16 @@ $filter .= "($f=$wc" . rcube_ldap::quote_string($value) . "$wc)"; } $filter .= ')';
// avoid double-wildcard if $values is empty
$filter = preg_replace('/*+/', '*', $filter);
// add general filter to query
if (!empty($this->prop['filter'])) {
// remove trailing brackets
$this->prop['filter'] = preg_replace('/^\(|\)$/', '', $this->prop['filter']);
$filter = '(&('.$this->prop['filter'] .')' . $filter . ')';
}
// set filter string and execute search $this->set_search_set($filter);
ciao, ema _______________________________________________ List info: http://lists.roundcube.net/dev/
On Tue, Feb 26, 2008 at 3:46 PM, Emanuele Rocca ema@galliera.it wrote:
- Roy McMorran mcmorran@mdibl.org, [2008-02-22 16:30 -0500]:
Thanks for this, guys. Collective effort, community effort. :-) I love it.
I created a ticket, please help yourself to it in the future: http://trac.roundcube.net/ticket/1484823
We'll hopefully include this tomorrow in the release.
Till _______________________________________________ List info: http://lists.roundcube.net/dev/
On Mon, Mar 3, 2008 at 1:32 AM, till klimpong@gmail.com wrote:
On Tue, Feb 26, 2008 at 3:46 PM, Emanuele Rocca ema@galliera.it wrote:
- Roy McMorran mcmorran@mdibl.org, [2008-02-22 16:30 -0500]:
Thanks for this, guys. Collective effort, community effort. :-) I love it.
I created a ticket, please help yourself to it in the future: http://trac.roundcube.net/ticket/1484823
This was committed to trunk some days ago: http://trac.roundcube.net/changeset/1152
~Thomas _______________________________________________ List info: http://lists.roundcube.net/dev/
On Mon, Mar 3, 2008 at 8:26 AM, Thomas Bruederli roundcube@gmail.com wrote:
On Mon, Mar 3, 2008 at 1:32 AM, till klimpong@gmail.com wrote:
On Tue, Feb 26, 2008 at 3:46 PM, Emanuele Rocca ema@galliera.it wrote:
- Roy McMorran mcmorran@mdibl.org, [2008-02-22 16:30 -0500]:
Thanks for this, guys. Collective effort, community effort. :-) I love it.
I created a ticket, please help yourself to it in the future: http://trac.roundcube.net/ticket/1484823
This was committed to trunk some days ago: http://trac.roundcube.net/changeset/1152
Even better. Missed it. Thanks!
Till _______________________________________________ List info: http://lists.roundcube.net/dev/