From: Markus Date: Thu, 1 Jun 2017 17:31:16 +0000 (+0200) Subject: Handle timeout-or-duplicate in RecaptchaHandler X-Git-Tag: 2.1.16~1^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a1f6a843e157b3d057e93da4d1e158405f0d7860;p=GitHub%2FWoltLab%2FWCF.git Handle timeout-or-duplicate in RecaptchaHandler --- diff --git a/wcfsetup/install/files/lib/system/recaptcha/RecaptchaHandler.class.php b/wcfsetup/install/files/lib/system/recaptcha/RecaptchaHandler.class.php index a9820e7494..b3c8e57089 100644 --- a/wcfsetup/install/files/lib/system/recaptcha/RecaptchaHandler.class.php +++ b/wcfsetup/install/files/lib/system/recaptcha/RecaptchaHandler.class.php @@ -60,6 +60,7 @@ class RecaptchaHandler extends SingletonFactory { const ERROR_INCORRECT_PARAMS = 'verify-params-incorrect'; const ERROR_INVALID_REFFERER = 'invalid-referrer'; const ERROR_NOT_REACHABLE = 'recaptcha-not-reachable'; + const ERROR_TIMEOUT_OR_DUPLICATE = 'timeout-or-duplicate'; /** * @see \wcf\system\SingletonFactory::init() @@ -136,6 +137,11 @@ class RecaptchaHandler extends SingletonFactory { throw new UserInputException('recaptchaString', 'false'); break; + case self::ERROR_TIMEOUT_OR_DUPLICATE: + // User was to slow to fill the captcha. + throw new UserInputException('recaptchaString', 'false'); + break; + default: throw new SystemException('reCAPTCHA returned the following error: '.$response); }