Page MenuHomePhabricator

LogFormatter::getIRCActionText() incorrectly escaping messages
Closed, DeclinedPublic

Description

LogFormatter::getIRCActionText() is escaping some messages but not others. It shouldn't escape any, since the content ends up in IRC (and EventStream and friends) not the html output.

Can I fix this? It should not affect very much unless something has an ", ', <, >, or & in it. There's a scary warning about back-compat referencing T36508 (albeit mostly for changing around parameter order and things, not the escaping), so I'm unclear if this is intentional

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Can you provide a few before/after examples of the exact output? Then I'll run it by a few IRC processors to see whether it is significant. Alternatively, jump in at https://github.com/countervandalism/CVNBot to see what it does (as example).

Do we really want to continue to support this forever? It seems like quite a scary hack, especially considering extension logs, its message handling is kind of random and really doesn't seem like functionality MediaWiki Core should provide, but like Technical-Debt to me.

Furthermore, it doesn't work in all cases, at least for patrol/autopatrol it appears broken.