Page MenuHomePhabricator

WikibaseMediaInfo should not export unprefixed config/globals in JavaScript
Closed, ResolvedPublic

Description

maxCaptionLength

parsedMessageAnonEditWarning

userCanEdit

And as of last month, also:

protectionMsg

These are far too generic to be exported without any prefixed relating to MediaWiki, Wikibase, or WikibaseMediaInfo. This is problematic within mw.config itself, but even more so because they also become global variables.

Probably easiest to consolidate them under a single, prefixed, key, such wgWbMediaInfo or something like that.

Details

Related Gerrit Patches:
mediawiki/extensions/WikibaseMediaInfo : masterAdd extension-specific prefix to global JavaScript variables

Event Timeline

Krinkle created this task.Sep 24 2019, 4:22 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 24 2019, 4:22 PM
Ramsey-WMF assigned this task to AnneT.Oct 7 2019, 4:26 PM
Ramsey-WMF triaged this task as Normal priority.
Ramsey-WMF moved this task from To Do to Doing on the Structured Data Engineering board.
Mholloway renamed this task from WikimediaMediaInfo should not export unprefixed config/globals in JavaScript to WikibaseMediaInfo should not export unprefixed config/globals in JavaScript.Oct 7 2019, 4:27 PM

Change 541902 had a related patch set uploaded (by Anne Tomasevich; owner: Anne Tomasevich):
[mediawiki/extensions/WikibaseMediaInfo@master] Add extension-specific prefix to global JavaScript variables

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

Change 541902 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Add extension-specific prefix to global JavaScript variables

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

matthiasmullie closed this task as Resolved.Oct 10 2019, 2:41 PM