Page MenuHomePhabricator

InfoAction doesn't take namespace protection into account
Closed, ResolvedPublic

Description

The "Page information" page for any message in the MediaWiki: namespace says that the message can be edited and moved by all users. For example, "MediaWiki:Wikimedia-copyrightwarning" exists, so http://en.wikipedia.org/w/index.php?title=MediaWiki:Wikimedia-copyrightwarning&action=info says "Allow all users" for both rights. For a message that doesn't exist, such as MediaWiki:Is awesome, the info page says that all users may create the page.

Example from Wikidata:
For example, at https://www.wikidata.org/w/index.php?title=Property:P7006&action=info (a semi-protected property), the page information displays:

image.png (1×1 px, 192 KB)

This should clearly indicate that the page is semi-protected by $wgNamespaceProtection (as all properties on Wikidata are now semi-protected, see T254280). Apparently this is a generic issue with $wgNamespaceProtection, not something that is specific to Wikidata.


URL: https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Protect-default/en
See Also:

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:57 AM
bzimport set Reference to bz43283.

I have a patch mostly written for this, but I'd like bug 43316 to be resolved first so I can properly test it.

This is the same problem we had with bug 43272: "Allow all users" actually means "Don't disallow any [additional] user", and in fact the message used to read (default).
It's a tricky balancing of clarity and correctness.

Probably it's not a good idea to reuse [[MediaWiki:Protect-default]] in info action, which – to make it worse – is available to all users and not only sysops.

(In reply to comment #2)

Gerrit change #39845

Patch still needs review...

Change 39845 had a related patch set uploaded by Legoktm:
Have action=info check protected namespaces

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

Change 39845 had a related patch set uploaded (by Matěj Suchánek; owner: Legoktm):
[mediawiki/core@master] Have action=info check protected namespaces

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

Change 554106 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/core@master] Show correct protection detail on InfoAction

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

Change 39845 abandoned by Legoktm:
Have action=info check protected namespaces

Reason:
RIP my first ever MediaWiki core patch

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

Change 554106 abandoned by Ammarpad:
Show correct protection detail on InfoAction

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

Reflect reality,

What reality are you referring to? I think we still want this bug to be solved.

matej_suchanek removed Ammarpad as the assignee of this task.
matej_suchanek lowered the priority of this task from Medium to Low.
matej_suchanek removed a project: Patch-For-Review.
matej_suchanek updated the task description. (Show Details)

Change 609531 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/core@master] Make InfoAction take namespace protection into account

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

https://gerrit.wikimedia.org/r/557879 and https://gerrit.wikimedia.org/r/609531 (this) touch the same code. The former also points out an edge case of page protection presentation. Tagging Platform Engineering for review to get this old bug fixed.

Change 557879 had a related patch set uploaded (by Will Doran; owner: Daimona Eaytoy):
[mediawiki/core@master] Fix some confusion about protections in InfoAction

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

Is this blocked / waiting for some other team to review it or can we review it?
CC @WMDE-leszek @Lucas_Werkmeister_WMDE
Or should we remove this from campsite?

It was on some WMF's team (Platform Engineering I believe) to review. They were last ping in January I believe

Hello @AMooney - any chance your team could take a look at the patch https://gerrit.wikimedia.org/r/c/mediawiki/core/+/609531/ (or this bug in general), and advise on the solution here? Thanks!

Change 557879 merged by jenkins-bot:

[mediawiki/core@master] Fix some confusion about protections in InfoAction

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

Change 609531 merged by jenkins-bot:

[mediawiki/core@master] Make InfoAction take namespace protection into account

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

Jdforrester-WMF subscribed.

I've made a minor code style follow-up, but this is done. Thank you!