Bug 55910 - Fechmail syntax classes raises 'TypeError: super(type, obj): obj must be an instance or subtype of type'
Fechmail syntax classes raises 'TypeError: super(type, obj): obj must be an i...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UDM - Extended Attributes
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-3-errata
Assigned To: Juan Carlos
Christian Castens
https://git.knut.univention.de/univen...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2023-03-27 10:28 CEST by Juan Carlos
Modified: 2023-03-29 17:39 CEST (History)
1 user (show)

See Also:
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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juan Carlos univentionstaff 2023-03-27 10:28:36 CEST
udm raises `super(type, obj): obj must be an instance or subtype of type` in univention-fetchmail syntax classes when a hook that is executed before processing fetchmail attributes initializes a udm module and reloads references.

I haven't tested if this happens with any module initialization in hooks or if it only happens with 'settings/extended_attribute'.
Comment 1 Juan Carlos univentionstaff 2023-03-27 14:10:48 CEST
Some tracebacks:

Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 238, in doit
    univention.admincli.admin.main(arglist, stdout, stderr)
  File "/usr/lib/python3/dist-packages/univention/admincli/admin.py", line 351, in main
    _doit(arglist, stdout=stdout, stderr=stderr)
  File "/usr/lib/python3/dist-packages/univention/admincli/admin.py", line 608, in _doit
    cli.list(list_policies, filter, superordinate_dn, policyOptions, policies_with_DN)
  File "/usr/lib/python3/dist-packages/univention/admincli/admin.py", line 640, in list
    return self._list(self.module_name, self.module, self.dn, self.lo, self.position, self.superordinate, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/univention/admincli/admin.py", line 844, in _list
    object.open()
  File "/usr/lib/python3/dist-packages/univention/admin/handlers/users/user.py", line 1169, in open
    univention.admin.handlers.simpleLdap.open(self)
  File "/usr/lib/python3/dist-packages/univention/admin/handlers/__init__.py", line 1101, in open
    self.call_udm_property_hook('hook_open', self)
  File "/usr/lib/python3/dist-packages/univention/admin/handlers/__init__.py", line 1077, in call_udm_property_hook
    func(module)
  File "/usr/lib/python3/dist-packages/univention/admin/hook.py", line 208, in hook_open
    obj[self.udm_attribute_name] = new_value
  File "/usr/lib/python3/dist-packages/univention/admin/handlers/__init__.py", line 428, in __setitem__
    p = s.parse(v)
  File "<string>", line 61, in parse
TypeError: super(type, obj): obj must be an instance or subtype of type


--------------------------


Error: : super(type, obj): obj must be an instance or subtype of type
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/tornado/web.py", line 1592, in _execute
    result = yield result
  File "/usr/lib/python3/dist-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/usr/lib/python3/dist-packages/univention/admin/rest/module.py", line 240, in decorator
    return await method(self, *self.path_args, **self.path_kwargs, **self.request.decoded_query_arguments, **self.request.body_arguments)
  File "/usr/lib/python3/dist-packages/univention/admin/rest/module.py", line 2850, in get
    searchable_properties = [{'value': '', 'label': _('Defaults')}] + [{'value': prop['id'], 'label': prop['label']} for prop in module.properties(None) if prop.get('searchable')]
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/udm/udm_ldap.py", line 976, in properties
    item.update(prop.syntax.get_widget_options(prop))
  File "<string>", line 53, in get_widget_options
TypeError: super(type, obj): obj must be an instance or subtype of type
Comment 2 Juan Carlos univentionstaff 2023-03-28 10:17:13 CEST
Changes:

Changes in Fetchmail syntax classes to fix error in udm. The bug occurred when hooks of other extended attributes of the user module initialize a udm module (e.g settings/extended_attribuets).


Commits:


b929d0d45d6f | Bug #55910: update advisory
a872e4c738f1 | Bug #55910: changelog and advisory
6b271b4bb379 | Bug #55910: Fix fetchmail syntax classes super call


Package:

Package: univention-fetchmail
Version: 13.0.5-7A~5.0.0.202303281008
Branch: ucs_5.0-0
Scope: errata5.0-3
Comment 3 Christian Castens univentionstaff 2023-03-28 10:17:48 CEST
QA: OK
Comment 4 Iván.Delgado univentionstaff 2023-03-29 17:39:56 CEST
<https://errata.software-univention.de/#/?erratum=5.0x623>