Page MenuHomePhabricator

Cascade-protecting files should protect the file, not the description page
Open, MediumPublic

Description

Author: happy.melon.wiki

Description:
Currently inlining an image on a cascade-protected page protects the image, which is good. T8579 introduces functionality that allows only the file to be protected, not the description page. Only changes which actually affect the cascade-protected page should be prevented, which in this case means changing the file pointed to. So cascade protection of inlined images should be to protect the file, not the description page.


Version: unspecified
Severity: normal

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:58 PM
bzimport set Reference to bz22521.
bzimport added a subscriber: Unknown Object (MLST).

See: http://commons.wikimedia.org/wiki/Commons:Village_pump#Cascade_protection_of_Main_Page

I feel cascade protection is a problem for Commons where it is impossible to modify the file description page of the highlighted file.

This prevents possible improvements such as categorization of the file, translation of file description, update of assessments template (to match WMF blog).

saibotrash wrote:

The cascade protection may be used to protect the file descs, too. I think it would be stupid if the behavior would change after several years (for some users).

Maybe a new option should be there: "except file descs from cascade protection"([edit=<unaffected>] just move and upload cascaded). The cascade protection only would need to apply to upload and move.

Saibo: The reason for cascade protection existence is to protect the page and everything that it's included on the page from being changed. Templates are protected because their contents are transcluded on the page. Since editing the template would change the contents of the article, cascade protection prevents the edition of the template contents. For images/files, what it's included in the page is the image itself, not the description, so the upload or revert of versions of the image should be prevented. Uploading a new version of a file is like editing a transcluded template. There's no point in prevent the edition of the file description since editing it won't affect the protected page in any way.

If you want file descriptions to be protected just transclude them on the protected page, like {{:File:Example.png}}. That would be consistent with other namespaces. Otherwise I don't see any point in using cascade protect just for file description pages.

Related: T62109; transclusion doesn't cascade protect properly.

This sounds blocked on T10658, which should IMHO fixed but was declined.

This sounds blocked on T10658, which should IMHO fixed but was declined.

I don't see how they are related. A cascade-protected page such as a main page should protect the used files properly (and not the file description pages), whether the main page is under full or semi-protection.

I don't see how they are related.

The relation is that AFAICS by editing a cascade-protected file's description one could protect further files without being sysop, the same scenario.

The relation is that AFAICS by editing a cascade-protected file's description one could protect further files without being sysop, the same scenario.

Nah ;) There's no recursion in cascade protect detection. What it matters is which cascade-protected pages actually has an *image link* to the file (via imagelinks table). You can't modify that with a file description page, can you?

I'll submit a patch for T109435 in a few minutes, when I finish the commit message.

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