Page MenuHomePhabricator

Introduce earlier check for cascade protected images when uploading
Open, LowPublic

Description

When uploading images, there is no check whether an image is protected until you hit the "upload image" button. Can I suggest that either 1) the "upload new version" button is hidden if protection is applied (like happens with the "edit" button on articles), or 2) the message appears as soon as you hit the button and go to the upload screen.

Event Timeline

Mdann52 raised the priority of this task from to Needs Triage.
Mdann52 updated the task description. (Show Details)
Mdann52 subscribed.
Restricted Application added subscribers: Steinsplitter, Aklapper. · View Herald Transcript

Which button do you mean?
For a upload-protected file such as File:Commons-logo.svg, I don't see any "upload new version" button, but instead there is "You cannot overwrite this file."

https://commons.wikimedia.org/wiki/File:Ruby_Laffoon_Portrait.png is the image in this context that I tested on, as well as a few others (these appear to be cascade protected)

zhuyifei1999 renamed this task from Introduce earlier check for protected images when uploading to Introduce earlier check for cascade protected images when uploading.Aug 18 2015, 11:27 AM
zhuyifei1999 set Security to None.

Related: T24521;
getCascadeProtectionSources is broken; the check of whether you're able to upload or not says true, when you actually need to be able to edit the description page to upload (another broken logic).

Yep, upload protection doesn't work as expected. Tested on beta:

upload-protect_bug.JPG (665×1 px, 106 KB)

Change 233207 had a related patch set uploaded (by Zhuyifei1999):
Cascade-protection: Fixes for files

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

Change 233207 abandoned by Zhuyifei1999:
Protection: Rework on how cascade-protection are applied to files

Reason:
I currently have no interest to fix this any time soon. If anyone else wish to work on this, feel free to restore.

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