Page MenuHomePhabricator

Update WikiEditor for changes in AbuseFilter and SpamBlacklist API error responses
Closed, ResolvedPublic

Description

API error responses generated by AbuseFilter and SpamBlacklist have changed, as announced here: https://lists.wikimedia.org/pipermail/mediawiki-api-announce/2019-September/000148.html (relevant task: T229539).

It appears you have special handling for the old responses. It only affects event logging.

extensions/WikiEditor/includes/WikiEditorHooks.php:
  300: 				} elseif ( isset( $errors[0][0] ) && $errors[0][0] === 'abusefilter-disallowed' ) {

Details

Related Gerrit Patches:
mediawiki/extensions/WikiEditor : masterUpdate SpamBlacklist error logging

Event Timeline

So it turns out that this line doesn't need updating, because it is looking at the error message key rather than the error code, and still works as expected.

However, a few lines below is this:

				} elseif ( isset( $errors[0][0] ) && $errors[0][0] === 'spamprotectiontext' ) {

…and this actually does need updating – not because of the API changes, but because of https://gerrit.wikimedia.org/r/c/mediawiki/extensions/SpamBlacklist/+/531302.

Change 536375 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/WikiEditor@master] Update SpamBlacklist error logging

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

Change 536375 merged by jenkins-bot:
[mediawiki/extensions/WikiEditor@master] Update SpamBlacklist error logging

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

ppelberg closed this task as Resolved.Oct 22 2019, 12:47 AM
happy5214 moved this task from Backlog to Closed on the WikiEditor board.Nov 20 2019, 8:38 AM