https://bugzilla.wikimedia.org/show_bug.cgi?id=28532

             Bug #: 28532
           Summary: wfMsgExt() and wfMsgWikiHtml() use $wgOut->parse()
           Product: MediaWiki
           Version: 1.18-svn
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: Low
         Component: Internationalization
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


wfMsgExt() and wfMsgWikiHtml() use $wgOut->parse(). This is inappropriate and
causes many bugs. For example, at the moment, if you try to view a wiki and
your CentralAuth username is blacklisted, it will throw an exception "Empty
$mTitle in OutputPage::parse" due to TitleBlacklistHooks::acceptNewUserName()
calling wfMsgWikiHtml(). 

$wgMessageCache->transform() does this correctly. It uses a separate instance
of the parser, it doesn't get titles or parser options from strange sources
like $wgOut, it doesn't mind if $wgTitle is unset, and it fails gracefully if
it is called re-entrantly.

I suggest MessageCache::transform() be refactored to provide a getParser()
method, which should then be used by a new method "MessageCache::parse()",
which should in turn be used by wfMsgWikiHtml() etc. instead of
$wgOut->parse(). The guarding against re-entrant calls should be extended to
cover both entry points.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to