Univention Bugzilla – Bug 33928
Bad search filter: Improve traceback
Last modified: 2015-01-16 12:04:21 CET
We have multiple feedbacks like this one: Traceback: File "/usr/lib/pymodules/python2.6/notifier/threads.py", line 82, in _run tmp = self._function() File "/usr/lib/pymodules/python2.6/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py", line 487, in _thread result = module.search( request.options.get( 'container' ), request.options[ 'objectProperty' ], request.options[ 'objectPropertyValue' ], superordinate, scope = request.options.get( 'scope', 'sub' ), hidden=request.options.get('hidden') ) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line 182, in wrapper_func raise LDAP_ConnectionError( str( e ) ) LDAP_ConnectionError: Bad search filter The exception provides no information whatsoever. I have no clue how to provoke that error even if I wanted to. The exact search filter should not be sent as it may contain confidential data. But these should work: def udm.query(): try: return module.search() except BadSearchFilter: # does not exist like that. get creative! raise UMC_OptionTypeError(module_name, container_given?, objectProperty, objectPropertyValue_given?, superordinate_given?, scope, hidden) When this gets fixed and installed, the tracebacks won't disappear but at least we know why they happen (hopefully).
If that could be solved deeper in LDAP itself (propagated as "info" attribute), it would be written accordingly in the final error message. Here a provoked error via UDM in python: > Traceback (most recent call last): > File "udm.py", line 10, in <module> > result = udm_modules.lookup('users/user', None, lo, base=c['ldap/base'], scope='sub', filter='(uid=foo') > File "/usr/lib/pymodules/python2.6/univention/admin/modules.py", line 801, in lookup > tmpres=module.lookup(co, lo, filter, base=base, superordinate=superordinate, scope=scope, unique=unique, required=required, timeout=timeout, sizelimit=sizelimit) > File "/usr/lib/pymodules/python2.6/univention/admin/handlers/users/user.py", line 2702, in lookup > for dn, attrs in lo.search(unicode(filter), base, scope, [], unique, required, timeout, sizelimit): > File "/usr/lib/pymodules/python2.6/univention/admin/uldap.py", line 356, in search > raise univention.admin.uexceptions.ldapError, _err2str(msg) > univention.admin.uexceptions.ldapError: Bad search filter
reported again (twice)
Remark: Using UCS 3.2 RC 1 fresh install. System has been updated to the latest, correct credentials used in LDB. Simply opening the OX mail settings will produce this error.
(In reply to Florian Best from comment #3) > Remark: > Using UCS 3.2 RC 1 fresh install. System has been updated to the latest, > correct > credentials used in LDB. Simply opening the OX mail settings will produce > this error. Sorry, quote from wrong ticket.
reported again.
again
reported again
One was fixed in Bug #35953
The approach from comment #1 has been implemented in Bug #30088. Bug #32979 also improved error handling. The underlying bug that this error can happen is Bug #28383. *** This bug has been marked as a duplicate of bug 30088 ***
OK, should not be a problem anymore.