https://bugzilla.wikimedia.org/show_bug.cgi?id=61704

--- Comment #4 from Brad Jorsch <bjor...@wikimedia.org> ---
Looking at this closer, I think the description of this bug is misleading.
Which means comment 1 should be ignored, at least as far as ConfirmEdit goes.

The problem isn't the order of the checks, it's that the captcha information is
added at the "NeedToken" step (implying it needs to be solved there) and not in
a later step. That should probably be the other way around.

So what should really be happening is that ConfirmEdit shouldn't use the
'AddNewAccountApiResult' hook at all. Instead, the case in ApiCreateAccount
handling a not-OK status should call some other hook function to populate an
$extraData array (which ConfirmEdit would use to inject its captcha data), then
call $this->getErrorFromStatus() and $this->dieUsage($msg, $code, 0,
$extraData). Or we could add an $extraData parameter to ApiBase::dieStatus.

And note you're probably still going to run into problems of this sort if there
are multiple AbortNewAccount hook functions, since ConfirmEdit's might be run
before the other extensions'. There's nothing the API can do about that, it
would take redefining AbortNewAccount to still fail the creation when
$abortStatus is non-OK even if the hook function returned true (and then
probably deprecate returning non-true for that hook).

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to