Skip to content

fix(LDAP): ensure stored groups are formatted as simple list - #42405

Merged
juliusknorr merged 1 commit into
masterfrom
fix/42374/ldap-remembered-groups-format
Dec 22, 2023
Merged

fix(LDAP): ensure stored groups are formatted as simple list#42405
juliusknorr merged 1 commit into
masterfrom
fix/42374/ldap-remembered-groups-format

Conversation

@blizzz

@blizzzblizzz commented Dec 20, 2023

Copy link
Copy Markdown
Member

Summary

With array_unique it is possible that the keys are not in sequential order but have gaps. json_encode then would store them as associative array, which later on json_decode would result in a stdClass by default. This is unexpected and would also contradict the return type hint.

Checklist

@blizzzblizzz added this to the Nextcloud 29 milestone Dec 20, 2023
@blizzz

Copy link
Copy Markdown
MemberAuthor

/backport to stable28

@blizzz

Copy link
Copy Markdown
MemberAuthor

/backport to stable27

@blizzz

Copy link
Copy Markdown
MemberAuthor

/backport to stable26

With array_unique it is possible that the keys are not in sequential order
but have gaps. json_encode then would store them as associative array,
which later on json_decode would result in a stdClass by default. This is
unexpected and would also contradict the return type hint.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@blizzz
blizzzforce-pushed the fix/42374/ldap-remembered-groups-format branch from cacbcbe to ee096f8CompareDecember 20, 2023 16:06
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbugfeature: ldap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: OCA\User_LDAP\Group_LDAP::getCachedGroupsForUserId(): Return value must be of type array, stdClass returned

4 participants

@blizzz@juliusknorr@artonge@come-nc