Fix Google Bug

This commit is contained in:
Kekskurse 2019-09-24 17:24:21 +02:00
parent b539e36ab9
commit 274d9e19b0
2 changed files with 6 additions and 2 deletions

View file

@ -15,5 +15,9 @@ DB_DATABASE=homestead
DB_USERNAME=homestead DB_USERNAME=homestead
DB_PASSWORD=secret DB_PASSWORD=secret
S3_ACCESS_KEY=abc
S3_SECRET=abc
S3_Bucket=abc
CACHE_DRIVER=file CACHE_DRIVER=file
QUEUE_CONNECTION=sync QUEUE_CONNECTION=sync

View file

@ -32,9 +32,9 @@ class UserController extends BaseController
//If Recptache is enabled check it at the beginning //If Recptache is enabled check it at the beginning
if(Setting::getSettingValue("recaptcha_v2_login")) { if(Setting::getSettingValue("recaptcha_v2_login")) {
$reCaptcha = new ReCaptcha(Setting::getSettingValue("recaptcha_v2_secret")); $reCaptcha = new ReCaptcha(Setting::getSettingValue("recaptcha_v2_secret"));
$response = $reCaptcha->verify($request->input("g-recaptcha-response")); $reresponse = $reCaptcha->verify($request->input("g-recaptcha-response"));
if(!$response->isSuccess()) { if(!$reresponse->isSuccess()) {
throw new HTTPException(400, "Captcha validation failed"); throw new HTTPException(400, "Captcha validation failed");
} }
} }