Bug 35896

Summary: Using brackets in the version of an INI file make the registration fail
Product: UCS Test Reporter: Stefan Gohmann <gohmann>
Component: App CenterAssignee: Dmitry Galkin <galkin>
Status: CLOSED FIXED QA Contact: Dirk Wiesenthal <wiesenthal>
Severity: normal    
Priority: P5 CC: gohmann, jmm, walkenhorst, wiesenthal
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
What kind of report is it?: --- What type of bug is this?: ---
Who will be affected by this bug?: --- How will those affected feel about the bug?: ---
User Pain: Enterprise Customer affected?:
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional):
Max CVSS v3 score:
Bug Depends on: 35136    
Bug Blocks:    

Description Stefan Gohmann univentionstaff 2014-09-11 14:46:54 CEST
Please check if a test case is possible.

+++ This bug was initially created as a clone of Bug #35136 +++

I used the following version string in the INI file of the UCC app:

[Application]
ID=ucc
Name=Univention Corporate Client 2.0
Version=2.0 (rev2)

This leads to an error when registering the app after the successful update/installation. The following traceback was logged:

20.05.14 08:51:42.298  MODULE      ( PROCESS ) : Aufruf des Nach-Installations-Triggers python-support
20.05.14 08:51:43.953  MODULE      ( ERROR   ) : Registering LDAP object failed. Bad search filter
20.05.14 08:51:43.953  MODULE      ( PROCESS ) : Die Registrierung der Applikation im LDAP ist fehlgeschlagen. Sie wird bei jedem Öffnen des App Center Moduls wiederholt werden.
20.05.14 08:51:43.953  MODULE      ( WARN    ) : Die Registrierung der Applikation im LDAP ist fehlgeschlagen. Sie wird bei jedem Öffnen des App Center Moduls wiederholt werden.
20.05.14 08:51:43.967  MODULE      ( WARN    ) : Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/appcenter/app_center.py", line 1399, in install
    self.tell_ldap(component_manager.ucr, package_manager)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/appcenter/app_center.py", line 1205, in tell_ldap
    ldap_object = iapp.get_ldap_object(or_create=True)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/appcenter/app_center.py", line 1104, in get_ldap_object
    return ApplicationLDAPObject(ldap_id, lo, co)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/appcenter/app_center.py", line 126, in __init__
    self.reload()
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/appcenter/app_center.py", line 129, in reload
    result = appcenter_udm_module.lookup(self._co, self._lo, 'id=%s' % self._ldap_id)
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/appcenter/app.py", line 401, 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 355, in search
    raise univention.admin.uexceptions.ldapError, _err2str(msg)
ldapError: Bad search filter


As a workaround I avoided the brackets in the version string, but we should fix the underlying bug.
Comment 1 Dmitry Galkin univentionstaff 2014-11-07 10:29:37 CET
(In reply to Stefan Gohmann from comment #0)
> Please check if a test case is possible.

r55479:
  * 20_appcenter/31_ini_version_check: test to check different App versions
    LDAP registration (Bug #35896).
Comment 2 Dirk Wiesenthal univentionstaff 2015-01-22 00:04:47 CET
OK