Disable reCAPTCHA without any provided keys
authorAlexander Ebert <ebert@woltlab.com>
Wed, 18 Apr 2018 14:40:31 +0000 (16:40 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 18 Apr 2018 14:40:31 +0000 (16:40 +0200)
wcfsetup/install/files/lib/system/captcha/RecaptchaHandler.class.php

index 48ce4408c481f1470ffe3fca61b097353aa6d81f..8c3d111d99daf7ec4da4089d9446600cb677adb6 100644 (file)
@@ -51,6 +51,11 @@ class RecaptchaHandler implements ICaptchaHandler {
         * @see \wcf\system\captcha\ICaptchaHandler::isAvailable()
         */
        public function isAvailable() {
+               if (!RECAPTCHA_PUBLICKEY || !RECAPTCHA_PRIVATEKEY) {
+                       // OEM keys are no longer supported, disable reCAPTCHA
+                       return false;
+               }
+               
                return true;
        }