diff --git a/src/applications/auth/controller/PhabricatorAuthRegisterController.php b/src/applications/auth/controller/PhabricatorAuthRegisterController.php --- a/src/applications/auth/controller/PhabricatorAuthRegisterController.php +++ b/src/applications/auth/controller/PhabricatorAuthRegisterController.php @@ -181,6 +181,13 @@ $e_password = true; $e_captcha = true; + $skip_captcha = false; + if ($invite) { + // If the user is accepting an invite, assume they're trustworthy enough + // that we don't need to CAPTCHA them. + $skip_captcha = true; + } + $min_len = PhabricatorEnv::getEnvConfig('account.minimum-password-length'); $min_len = (int)$min_len; @@ -193,7 +200,7 @@ if (($request->isFormPost() || !$can_edit_anything) && !$from_invite) { $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); - if ($must_set_password) { + if ($must_set_password && !$skip_captcha) { $e_captcha = pht('Again'); $captcha_ok = AphrontFormRecaptchaControl::processCaptcha($request); @@ -464,7 +471,7 @@ ->setError($e_email)); } - if ($must_set_password) { + if ($must_set_password && !$skip_captcha) { $form->appendChild( id(new AphrontFormRecaptchaControl()) ->setLabel(pht('Captcha'))