Reducing timeout for ReCAPTCHA response from 30 to 10 seconds
authorAlexander Ebert <ebert@woltlab.com>
Thu, 27 Feb 2014 21:14:40 +0000 (22:14 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 27 Feb 2014 21:14:40 +0000 (22:14 +0100)
wcfsetup/install/files/lib/system/recaptcha/RecaptchaHandler.class.php

index 820effadd67d8c67c687bc9f9ad6104e1d418f8c..a197409db0558fec02b196077e6fae12b7887f37 100644 (file)
@@ -143,7 +143,7 @@ class RecaptchaHandler extends SingletonFactory {
         * @param       string          $response
         */
        protected function verify($challenge, $response) {
-               $request = new HTTPRequest('http://www.google.com/recaptcha/api/verify', array(), array(
+               $request = new HTTPRequest('http://www.google.com/recaptcha/api/verify', array('timeout' => 10), array(
                        'privatekey' => $this->privateKey,
                        'remoteip' => UserUtil::getIpAddress(),
                        'challenge' => $challenge,