Bug 54572 - [5.0-1]u-group-membership-cache returns None instead of empty list
[5.0-1]u-group-membership-cache returns None instead of empty list
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: LDAP
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 5.0-1-errata
Assigned To: Julia Bremer
Dirk Wiesenthal
:
Depends on: 54561
Blocks:
  Show dependency treegraph
 
Reported: 2022-03-21 18:31 CET by Julia Bremer
Modified: 2022-10-11 16:29 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.143
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2022030421000264
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 Julia Bremer univentionstaff 2022-03-21 18:31:44 CET
Also needed for 5.0-1

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

univention-group-membership-cache returns unexpected values if a cache entry has no values.

A library using the cache expected that an empty list is returned if an entry has no value - the usual use case is to iterate over the returned values. I would also expect that an empty list is returned.

I would also expect that cache.get() returns [], not None. Although one could argue that a user of the cache has to check if the return value is None.

Traceback from customer environment, with installed office365 app.

"/usr/lib/pymodules/python2.7/univention/office365/udm_helper.py", line 146, in group_in_azure
    alias_users = set(map(unicode.lower, univentionOffice365ADConnectionAlias.get(self.adconnection_alias)))
TypeError: argument 2 to map() must support iteration

The issue exists in UCS 4 + 5
Comment 1 Julia Bremer univentionstaff 2022-03-21 18:45:08 CET
Package: univention-group-membership-cache
Version: 2.0.0-6A~5.0.0.202203211837
Branch: ucs_5.0-0
Scope: errata5.0-1

8a8fdebcd4 Bug #54561: advisory
29fb0ffa20 Bug #54561: Return an empty list instead of None if key doesn't exist in cache
Comment 2 Dirk Wiesenthal univentionstaff 2022-03-23 10:51:16 CET
Works as in 4.4-8

VERIFIED