|
From: Hans A. <Han...@Ph...> - 2002-07-22 12:12:56
|
On Montag, 22. Juli 2002 13:43, Klaus Boehm wrote:
> I have this line in my sourcecode.
>
>
> s = l.search_s("ou=xxxxx, o=xxx", ldap.SCOPE_SUBTREE, gecos,
> attrlist=['uidnumber','gidnumber','uid'], attrsonly=0)
>
> and i want pass the parameter filterstring as a variable(gecos) from
> another programm(Website).
> But i get an error: "ldap.FILTER_ERROR: {'desc': 'Bad
> search filter'}"
>
> What can i do to avoid this error?
Could you please tell us the contents of the gecos variable? Since the
error is a 'Bad search filter', it would be really helpful to know the
search filter...
Useful searchfilters look like '(objectclass=*)', or '(gecos=xyz)'. If
xyz is in your gecos variable, you can build the search filter with
'(gecos=%s)' % gecos
HTH,
Hans
--
Han...@Ph...
|