Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid collisions with cache keys at AbstractAdmin::isGranted() #6044

Merged
merged 1 commit into from Apr 14, 2020

Conversation

phansys
Copy link
Member

@phansys phansys commented Apr 11, 2020

Subject

Avoid collisions with cache keys at AbstractAdmin::isGranted().

I am targeting this branch, because this change respects BC.

I'd like to reproduce the reported issue in the test case, but I can't find the way to generate the collisions between consecutive calls to spl_object_hash() inside the test case (ref).

Closes #5621.

Changelog

### Fixed
- Fixed collisions with cache keys at `AbstractAdmin::isGranted()`.

@phansys phansys added the patch label Apr 11, 2020
@phansys phansys requested a review from a team April 11, 2020 23:43
@phansys phansys marked this pull request as ready for review April 11, 2020 23:43
tests/Admin/AdminTest.php Outdated Show resolved Hide resolved
tests/Admin/AdminTest.php Outdated Show resolved Hide resolved
franmomu
franmomu previously approved these changes Apr 12, 2020
VincentLanglet
VincentLanglet previously approved these changes Apr 12, 2020
@greg0ire greg0ire merged commit 0365019 into sonata-project:3.x Apr 14, 2020
@greg0ire
Copy link
Contributor

Thanks @phansys !

@phansys phansys deleted the ticket_5621 branch April 14, 2020 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[AbstractAdmin] isGranted() cache should not rely on spl_object_hash()
4 participants