Problem/Motivation
Nowhere in BookNavigationBlock do we do anything with roles, the current user, or even permissions. This is just a remnant from long ago that is incorrect. We're working on making this block cacheable in #2483181: Make book navigation block cacheable.
Proposed resolution
Remove the user.roles cache context.
Note that this block has max-age=0 explicitly anyway, so it will never be cached. This does not change that. Hence this cannot possibly create any security problems.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
Why during RC?
Because core setting the right example wrt cacheability metadata is important: developers will look at core's examples and learn from them, core being wrong is problematic.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2604092-5.patch | 727 bytes | wim leers |
Comments
Comment #2
wim leersComment #3
wim leersComment #5
wim leersBlocked on #2541344: BlockBase subclasses should merge their cache tags/contexts with the parent's (BlockBase's) because patch is relative to that.
Comment #6
wim leersComment #7
wim leers#2541344: BlockBase subclasses should merge their cache tags/contexts with the parent's (BlockBase's) landed, unpostponing.
Comment #8
zaporylieI think this is ready to be committed. Patch does not break anything on any existing site nor change how BookNavigationBlock blocks are cached - just cleaning up redundant code.
Thanks Wim
Comment #9
catchDiscussed with @xjm, @effulgentsia and @alexpott.
Tagging for RC target. This as near zero impact, but also absolutely zero disruption.
Comment #11
wim leersTestbot was aborted for whatever reason. Restoring status & re-testing.
Comment #12
alexpottCommitted 4000915 and pushed to 8.0.x. Thanks!