Page MenuHomePhabricator

New AbuseFilterCentralDb class to fix using the wrong credentials for external databases.
Open, Needs TriagePublic

Description

https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/470499

I previously submitted a patch in the past, but it was rejected for fixing the issue.
https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/302608/

  • This new patch adds a AbuseFilterCentralDb using an Extension:Echo like method of centralizing where the central/global database connection is handled.
  • This allows connections using $wgExternalServers to work with the new setting $wgAbuseFilterCentralCluster.
  • It is also backwards compatible so that if only $wgAbuseFilterCentralDB is configured it will use the outdated wfGetDb() method.
  • Many places that were reusing global'ing $wgAbuseFilterCentralDB in and checking it have been simplified.
  • Database connection and AbuseFilterCentralDb instance reuse are enforced as needed.

Event Timeline

Alexia created this task.Oct 29 2018, 9:12 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 29 2018, 9:12 PM

Change 470499 had a related patch set uploaded (by Alexia; owner: Alexia):
[mediawiki/extensions/AbuseFilter@master] T208268: New AbuseFilterCentralDb class to fix using the wrong credentials for external databases.

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

Alexia updated the task description. (Show Details)Oct 29 2018, 9:17 PM