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

Assigned To
Needs Triage
Anomie, tstarling, MZMcBride and 3 others

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 for more), and for getting Wikidata properties of pages other than the current one, which also won't be updated properly (see 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

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

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

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

The change will be deployed to WMF wikis with 1.23wmf14, see 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.