Page MenuHomePhabricator

Argument 3 passed to SimpleCaptcha::passCaptchaLimited() must be an instance of User, undefined variable given
Closed, ResolvedPublic

Description

Beta fluorine has a bunch of errors like this:

May 17 08:25:19 deployment-mediawiki02:  #012Warning: passCaptchaLimited() expects exactly 3 parameters, 0 given in /srv/mediawiki/php-master/extensions/ConfirmEdit/SimpleCaptcha/Captcha.php on line 1093
May 17 08:25:19 deployment-mediawiki02:  #012Catchable fatal error: Argument 3 passed to SimpleCaptcha::passCaptchaLimited() must be an instance of User, undefined variable given in /srv/mediawiki/php-master/extensions/ConfirmEdit/SimpleCaptcha/Captcha.php on line 1093

This is caused by https://gerrit.wikimedia.org/r/#/c/285350/ which adds a bunch of required arguments to SimpleCaptcha::passCaptchaLimited and replaces passCaptchaLimited() calls with passCaptchaLimitedFromRequest($wgRequest, $wgUser). Apparently this method is called from Flow and that has not been updated.

Event Timeline

Tgr created this task.May 17 2016, 8:35 AM
Restricted Application added subscribers: Zppix, Florian, Aklapper. · View Herald TranscriptMay 17 2016, 8:35 AM
Florian claimed this task.May 17 2016, 8:57 AM
Florian triaged this task as High priority.
Florian added a project: StructuredDiscussions.

Change 289155 had a related patch set uploaded (by Florianschmidtwelzow):
Fix Flow for AuthManager-changes in ConfirmEdit

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

Change 289155 merged by jenkins-bot:
Fix Flow for AuthManager-changes in ConfirmEdit

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

Change 289159 had a related patch set uploaded (by Gergő Tisza):
Fix Flow for AuthManager-changes in ConfirmEdit

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

Tgr closed this task as Resolved.May 17 2016, 9:51 AM

Tried triggering a captcha in Flow on beta and it worked fine.

Change 289159 merged by jenkins-bot:
Fix Flow for AuthManager-changes in ConfirmEdit

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

Tgr reopened this task as Open.May 17 2016, 4:49 PM

Reopening, this will affect ContactPage / ContactPageFundraiser as well.

Tgr added a comment.May 17 2016, 5:26 PM

testwiki is the only group0 wiki using ContactPage so this is not strictly a blocker for the group0 deploy. In any case I can fix this in an hour or so.

Change 289250 had a related patch set uploaded (by Gergő Tisza):
Expose equivalent functionality for passCaptcha

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

Change 289251 had a related patch set uploaded (by Gergő Tisza):
Replace passCaptcha with passCaptchaFromRequest

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

Change 289251 merged by jenkins-bot:
Replace passCaptcha with passCaptchaFromRequest

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

Change 289250 merged by jenkins-bot:
Expose equivalent functionality for passCaptcha

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

Change 289263 had a related patch set uploaded (by Gergő Tisza):
Replace passCaptcha with passCaptchaFromRequest

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

Tgr added a comment.May 17 2016, 7:18 PM

Fixed ContactPage, ContactPageFundraiser is probably not used in production?

Tgr closed this task as Resolved.May 17 2016, 7:18 PM

Change 289263 merged by jenkins-bot:
Replace passCaptcha with passCaptchaFromRequest

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

mmodell added a subscriber: mmodell.EditedMay 17 2016, 8:36 PM

it looks like https://gerrit.wikimedia.org/r/289263 didn't make the branch cut

does it need to be cherry-picked to wmf.2?

Tgr added a comment.May 17 2016, 8:40 PM

No, it's not used in production. I just got confused by grepping on beta where /extensions includes all Gerrit-hosted extensions.

Change 289326 had a related patch set uploaded (by Gergő Tisza):
Expose equivalent functionality for passCaptcha

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

Change 289327 had a related patch set uploaded (by Gergő Tisza):
Replace passCaptcha with passCaptchaFromRequest

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

Change 289326 merged by jenkins-bot:
Expose equivalent functionality for passCaptcha

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

Change 289327 merged by jenkins-bot:
Replace passCaptcha with passCaptchaFromRequest

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