Page MenuHomePhabricator

Cleanup logging and curl use in wikitech post-block hooks
Open, MediumPublic

Description

Follow up the quick and dirty work done to get account blocking working against Gerrit and Phabricator with a big nicer logging and existing MediaWiki curl wrappers.

See wmf-config/wikitech.php.

Event Timeline

Removing task assignee due to inactivity, as this open task has been assigned for more than two years (see emails sent to assignee on May26 and Jun17, and T270544). Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be very welcome!

(See https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.)

I think it is related to this task, when amending the hook, I found an issue that curl_exec returns false on failure but might return the result of a query (with CURLOPT_RETURNTRANSFER) which in turns can evaluates to false in PHP (eg an empty string). https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/1011171/2/wmf-config/wikitech.php

Had we been using an higher level API, we might not had been hit by that bug.