Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

MembershipManager returns memberships of the wrong group #479

Merged
merged 2 commits into from
Apr 25, 2019

Conversation

pfrenssen
Copy link
Contributor

There is a bug in MembershipManager::getGroupMembershipIdsByRoleNames() and ::getGroupMembershipsByRoleNames(): when there are multiple groups with different entity types but the same entity ID then the results of the first group will be cached and will be returned for the other groups.

We should include the entity type in the cache ID.

If we do not include this the cache will return the wrong results for groups
that have identical entity IDs but different entity types.
Copy link
Collaborator

@MPParsley MPParsley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find!

@pfrenssen
Copy link
Contributor Author

Thanks!

@pfrenssen pfrenssen merged commit 8e5dd79 into 8.x-1.x Apr 25, 2019
@pfrenssen pfrenssen deleted the membership-manager-cache-pollution branch April 25, 2019 13:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants