From a1f6a843e157b3d057e93da4d1e158405f0d7860 Mon Sep 17 00:00:00 2001 From: Markus Date: Thu, 1 Jun 2017 19:31:16 +0200 Subject: [PATCH] Handle timeout-or-duplicate in RecaptchaHandler --- .../files/lib/system/recaptcha/RecaptchaHandler.class.php | 6 ++++++ 1 file changed, 6 insertions(+) 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); } -- 2.20.1