Page MenuHomePhabricator

Cascading protection has no effect on image uploads
Closed, DeclinedPublic

Description

Author: bugs

Description:
The cascading protection feature has no effect on restricting image uploads to a specified filename.
However, once the image is uploaded, cascading protection kicks in and fully protects the page. Example
at meta: [http://meta.wikimedia.org/wiki/Image:WinXP_warn.png].


Version: unspecified
Severity: normal
OS: Windows XP
Platform: PC

Details

Reference
bz9583

Event Timeline

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

axel9891 wrote:

Like with permanently deleted pages, there are images which are simply
placeholders to prevent uploads.

Note sure exactly when this was fixed, but on my test wiki and on en wikipedia I
cannot reproduce this, I get "protected page" warnings.

axel9891 wrote:

Yeah, it appears to work on Meta-Wiki too.

bugs wrote:

Seems to have been fixed then.

  • Bug 9687 has been marked as a duplicate of this bug. ***

Still seems to be a problem on MW.org. See
http://www.mediawiki.org/wiki/Image:MediaWiki_logo.png, which should be
protected due to its inclusion on
http://www.mediawiki.org/wiki/Project:Protected_titles/list

Is this because the image is being pulled from commons?

The image isn't transcluded; it's simply linked.

Try [[Image:MediaWiki logo.png|1px]].

It is included using standard template syntax: {{Image:MediaWiki logo.png}}
'What links here' for the image says: Project:Protected titles/list (inclusion)

That seems like it's been transcluded to me, and is exactly the same as the
other non-image pages in that list behave.

What's transcluded is the nonexistent image description page, not the image
itself. Image transclusions are noted not on the "What links here" page, but
below the image description (under the "Links" heading).

That syntax transcludes most types of pages, but not images. Please try the
syntax suggested above.

I just noticed that the image already is transcluded on the main page (which has
cascading protection enabled), so this shouldn't even be necessary. What issue
are you experiencing?

OK - well that worked, and achieves what I wanted. However it does raise the
question as to why {{Image:foo}} doesn't protect the description page from being
edited (even if it doesn't protect against new uploads)...

Re comment 11, I'm not sure what's going on there. It isn't included on the
main page, and that cascade was never there before. It appeared when I went to
check it after adding it to the protected titles list, but has now vanished
again. Glitch? [[MediaWiki]] hasn't been edited since january.

  1. I don't know why that syntax fails to protect the image description page. I

just know that it does. :-)

  1. I thought that I saw the image on the main page (in addition to the logo in

the upper left-hand corner). Is it possible that someone edited one of the main
page templates to include it (and then reverted)? Otherwise, yeah, I suppose
that it must have been a glitch.

  1. Worth logging a separate bug for?
  1. Well, I thought that might be the case, but I can't see anything in recent

changes. Maybe that's what it was though. Either way, it was transitory.

No, I wouldn't bother filing a bug report. The use of cascading protection to
prevent page creation isn't an officially supported MediaWiki function; it's a
kludge that I devised. With the existence of an alternative workaround, I see
little point in asking the developers to fix a feature that they didn't even
intend to include. :-)

(In reply to comment #7)

Still seems to be a problem on MW.org. See
http://www.mediawiki.org/wiki/Image:MediaWiki_logo.png, which should be
protected due to its inclusion on
http://www.mediawiki.org/wiki/Project:Protected_titles/list

Is this because the image is being pulled from commons?

Cascading protection does not cascade accross projects.

Interesting... I thought it was a kludge _I_ devised *grin*

Re: Comment 17, I am aware that the cascade won't protect the image on commons,
but it should stop people uploading a local version that obscures it, or from
editing the page (we get a lot of test edits all over the place on MW.org).

"This page has been protected from editing, because it is included in the
following page, which are protected with the "cascading" option turned on:

  • Project:Protected titles/list

Return to MediaWiki."

If there is a problem elsewhere, please open a new bug report which is specific
to the problem experienced.

Brion - the cascading protection works provided you link the image using
[[Image:foo]] rather than transclude it using {{Image:foo}}. The latter does
not protect the decription page (which, imho, is a bug) or the image upload
(which is, imho again, not a problem). As per the advice above (that this was
an 'unsupported use case' I have not logged the issue. If you think I should
log it then let me know and I will do so.