mw.message output formats other than plain allowing unintended behaviors
Closed, ResolvedPublic

Assigned To
None
Priority
Needs Triage
Author
Jackmcbarn
Subscribers
Anomie, tstarling, MZMcBride and 3 others
Projects
Reference
bz60758
Description

Using mw.message.newRawMessage allows performing several actions that are otherwise disabled because they break things, such as checking if a page exists without incrementing the expensive function count or adding a pagelink (see https://en.wikipedia.org/wiki/Wikipedia_talk:Lua#Ifexist_alternative for more), and for getting Wikidata properties of pages other than the current one, which also won't be updated properly (see https://en.wikipedia.org/wiki/Wikipedia_talk:Lua#.22Hacking.22_into_Wikidata_to_get_properties_of_miscellaneous_articles for more). Is there some way that newRawMessage could be tweaked to either not allow this type of thing at all, or to make it happen properly?


Version: unspecified
Severity: normal

bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz60758.
Jackmcbarn created this task.Via LegacyFeb 3 2014, 1:36 PM
Anomie added a comment.Via ConduitFeb 3 2014, 3:10 PM

The problem is that it's not happening in Scribunto, it's the underlying Message classes that are doing this.

The ideal thing to do might be to remove mw.message:parse, mw.message:parseAsBlock, mw.message:text, and mw.message:escaped. mw.message:plain would continue to be available; this is the equivalent of the {{int:}} magic word.

Anomie added a comment.Via ConduitFeb 3 2014, 3:11 PM

Also note it's not just RawMessage, someone with editinterface could put the same problematic things in the MediaWiki namespace and use it that way.

gerritbot added a comment.Via ConduitFeb 3 2014, 8:10 PM

Change 110983 had a related patch set uploaded by Jackmcbarn:
Remove message formats other than plain

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

gerritbot added a comment.Via ConduitFeb 6 2014, 5:01 PM

Change 110983 merged by jenkins-bot:
Remove message formats other than plain

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

Anomie added a comment.Via ConduitFeb 6 2014, 5:04 PM

The change will be deployed to WMF wikis with 1.23wmf14, see https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap for the schedule.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.