Page MenuHomePhabricator

Admins can get around oversight (suppression) of file revisions
Closed, ResolvedPublic

Description

Admins (More generally, users with undelete rights) can remove the revision deletion status of a file revision (Including if the file is suppressed), even if they don't have suppressrevision or deleterevision rights. Admins are not supposed to be able to do this.

Basically, when doing Special:Undelete, if the file version you're undeleting would be the newest version of the image (So it would be the main image associated with the file page), then the fa_deleted field is totally ignored during the undeletion process.

Steps to reproduce:

  • Find some file version that's suppressed. (this works both for "deleted" suppressed files, and files that are not "deleted" but just "suppressed")
  • If there is currently an image for the associated page, "delete" (that is, normal ?action=delete, not revdel) the image, so that there is no image when browsing to File:<filename>
  • Special:Undelete the specific revision you want to remove suppresion from (and only that revision)
  • Image should now be publicly viewable, despite the fact that admins aren't supposed to be able to view it.

Event Timeline

Yeah, that check was backwards. The cleanupBatch field is already updated at the end of each loop iteration.

The patch looks all good to me.

22:34 dapatrick: Deployed patch for T132926 to wmf.10

demon changed the visibility from "Custom Policy" to "Public (No Login Required)".Aug 23 2016, 1:24 AM
demon changed Security from Software security bug to None.

Change 306117 merged by jenkins-bot:
SECURITY: Do not allow undeleting a revdel'd file if its top file

https://gerrit.wikimedia.org/r/306117

Change 306131 had a related patch set uploaded (by Ejegg):
Do not allow undeleting a revdel'd file if its top file

https://gerrit.wikimedia.org/r/306131

Change 306108 merged by jenkins-bot:
SECURITY: Do not allow undeleting a revdel'd file if its top file

https://gerrit.wikimedia.org/r/306108

Change 306131 merged by jenkins-bot:
Do not allow undeleting a revdel'd file if its top file

https://gerrit.wikimedia.org/r/306131

Change 306089 merged by jenkins-bot:
SECURITY: Do not allow undeleting a revdel'd file if its top file

https://gerrit.wikimedia.org/r/306089

Change 306098 merged by jenkins-bot:
SECURITY: Do not allow undeleting a revdel'd file if its top file

https://gerrit.wikimedia.org/r/306098