Page MenuHomePhabricator

[BUG] Captions freezes when user injects illegal language codes that MediaWiki doesn't support
Closed, ResolvedPublic


I have cmn on my userpage. When I click the pen button, I get this because cmn is not available.

<div data-caption-languages="en,cmn,de,yue,zh" class="filepage-mediainfo-entitytermsview oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed oo-ui-pendingElement-pending">

Unsupported babelcodes should be ignored to avoid this I guess?

Event Timeline

Roy17 created this task.Jan 15 2019, 12:24 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 15 2019, 12:24 AM
Roy17 reopened this task as Open.Jan 15 2019, 5:21 AM

@Aklapper This is not the same.

cmn is ISO 639-3 code for Mandarin Chinese, which I speak natively, but this code is not recognised by the captions feature. The same problem can occur for aaa (Ghotuo language) and so on.

Roy17 added a comment.Jan 15 2019, 5:19 PM

It freezes at this state. The code I gave was from checking the html.

Roy17 removed a subscriber: Roy17.
Jdforrester-WMF renamed this task from [BUG] captions freezes when babelcodes are not available to [BUG] Captions freezes when user injects illegal language codes that MediaWiki doesn't support.Jan 16 2019, 6:06 PM
Jdforrester-WMF claimed this task.

Change 484810 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/WikibaseMediaInfo@master] CaptionsPanel.getCaptionLanguagesList: Drop unknown languages

Change 484810 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] CaptionsPanel.getCaptionLanguagesList: Drop unknown languages

Ramsey-WMF closed this task as Resolved.Feb 6 2019, 6:08 PM
Ramsey-WMF added a subscriber: Ramsey-WMF.

Tested on production with cmn-0. Works.

greg added a project: Multimedia.Mar 7 2019, 10:59 PM