Page MenuHomePhabricator

hCaptcha risk scores: Add a new hook type in ConfirmEdit for forwarding risk score infomation for blocks
Closed, ResolvedPublic0.5 Estimated Story Points

Description

Summary

  • In order to handle the risk score information passed by the frontend after encountering a hook, we need to define a new hook type to be implemented in MediaWiki-extensions-WikimediaEvents.
  • Doing so alows ConfirmEdit (CAPTCHA extension) to call the existing CaptchaScoreHooks class for submitting the new risk score information.
  • This follows the existing approach for passing risk score information from ConfirmEdit to WikimediaEvents.

Acceptance Criteria:

  • A ConfirmEditHCaptchaRiskScoreRetrievedForBlocksHook interface is defined in ConfirmEdit, with onConfirmEditHCaptchaRiskScoreRetrievedForBlocks( float $riskScore, int[] $blockIds, UserIdentity $user, WebRequest $request ) as its contract
  • The exiting HookRunner class implements the interface and dispatches the hook

Event Timeline

hector.arroyo renamed this task from hCaptcha risk scores: Add a new hook type ConfirmEditHCaptchaRiskScoreRetrievedForBlocks to hCaptcha risk scores: Add a new hook type in ConfirmEdit for forwarding risk score infomation for blocks.Mon, May 18, 6:49 PM
hector.arroyo changed the task status from Open to In Progress.
hector.arroyo set the point value for this task to 0.5.
hector.arroyo updated the task description. (Show Details)

Change #1288955 had a related patch set uploaded (by Harroyo-wmf; author: Harroyo-wmf):

[mediawiki/extensions/ConfirmEdit@master] hcaptcha: New hook for passing risk scores

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

Change #1288955 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@master] hcaptcha: New hook for passing risk scores for blocks

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