Steps to reproduce
- Navigate to Media settings ('/admin/config/media/media-settings')
- Enable Standalone media URL
- Now, view any media from the front end while ensuring that you are logged out.
- As a result, the "View" and "Revision" tabs are visible to logged-out or anonymous users.
Issue fork drupal-3411837
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3411837-media-revision-ui
changes, plain diff MR !6013
Comments
Comment #2
cilefen commentedComment #3
catchThis was discussed within the security team and decided this could be fixed publicly.
Comment #4
catchComment #11
longwaveComment #12
longwaveUploaded the patch by @larowlan to an MR.
Comment #13
longwaveSaving issue credits based on the triage done over on security.drupal.org.
Comment #14
catchOne question on the MR.
Comment #15
smustgrave commentedseems to be failing a number of rest tests. Should they be updated or the solution relooked at?
Comment #16
larowlanworking on fails
Comment #17
larowlanAddressed failure, which was also asserting that revision info was available to non admin users 🙃
Comment #18
larowlanClarifying title, because whilst they can view the list and published revisions, they can't interact with the revision UI (e.g. revert revisions, delete revisions etc)
Comment #19
wim leersI think this should be reviewed by >=1 media system maintainer?
Comment #20
catchI was concerned that we were opening up a new information disclosure bug by removing the entity access checks with the original fix here, turns out we were, but @larowlan added extra test coverage and restored some of that logic (in a place that actually works correctly).
For me this is RTBC now, I've also pinged the media system maintainers for a review in slack per #19.
Comment #21
marcoscano👍 looks good to me, thanks!
Comment #22
alexpottCommitted and pushed 8f3f374984 to 11.x and 8a4467d55e to 10.2.x. Thanks!
Comment #25
longwaveNice work, was about to commit this but @alexpott already had!