[Ruby-activeldap-discuss] problems with 0.8.2 and net-ldap: invalid filter syntax

Kouhei Sutou kou at cozmixng.org
Wed Jun 20 08:02:09 EDT 2007


> > >     > > so there was no solution for this? is it an activeldap-bug?
> > >     >
> > >     > If you tell me a LDAP filter notation that uses "=" and ","
> > >     > in filter value, I'll implement. You can use other LDAP
> > >     > tools like ldapsearch to test LDAP filter notation.
> > >    
> > >     I think we should escape "=" and "," in the LDAP filter:
> > >       (&(member=uid=z3cko,ou=users,dc=p1ng,dc=net)(objectClass=top)(objectClass
> > >     =customGroup))
> > > 
> > > To esacpe the "=" character use \3D. Example: uid==test would be uid=\3Dtest.
> > > But I didn't find a complete list with all special characters... works with
> > > OpenLDAP.
> > 
> > Thanks! But I notice that we need to escape "=" and ",". We
> > can use them without escaping.
> 
> Yes, we can use "\3D" to escape "=".
> ..OK I'll always escape "=".

But Net::LDAP's filter parser can't accept "\XX"
syntax. This is a bug of Net::LDAP not ActiveLdap. I've sent
a patch to fix the bug to the maintainer of Net::LDAP.



Thanks,
--
kou


More information about the Ruby-activeldap-discuss mailing list