Page MenuHomePhabricator

Parse wikilinks in logentry-mwoauthconsumer-*
Open, Needs TriagePublic

Description

Links in log entries are handy for auditing user activity. Links in logentry-mwoauthconsumer-propose would be especially handy because that's the one shown below new OAuth app proposals, where checking whether the user can be trusted is often helpful. logentry-mwoauthconsumer-* messages are currently handled as plaintext, that should be changed.

Event Timeline

Aklapper raised the priority of this task from Medium to Needs Triage.Nov 18 2020, 10:21 AM

I would like to work on this task. I searched logentry-mwoauthconsumer-propose on codesearch and it only returns json files. Where are these files handled?

Searching for ManualLogEntry is usually a good bet. In this case it's ConsumerSubmitControl::makeLogEntry.
See https://www.mediawiki.org/wiki/Manual:Logging_to_Special:Log#Adding_links on what needs to be changed.

So, I have to make a new function called makePageLink in ConsumerSubmitControl class like it's done in the eg. given in the link you provided https://gerrit.wikimedia.org/g/mediawiki/extensions/Translate/+/HEAD/utils/TranslateLogFormatter.php#73 and then use it in all the makeLogEntry ?

No, you'd have to make a custom LogFormatter subclass like TranslateLogFormatter does, and configure the extension to use it, similar to the example at https://www.mediawiki.org/wiki/Manual:Logging_to_Special:Log#In_your_extension_setup_file