From 768edc6a219078a1fca3cbb9d6ad9929f1948067 Mon Sep 17 00:00:00 2001 From: Rowan Merewood Date: Mon, 28 Sep 2026 15:04:50 +0100 Subject: [PATCH] Allow google/recaptcha 2.x Signed-off-by: Rowan Merewood --- composer.json | 2 +- composer.lock | 2 +- src/Plugins/Auth/AuthenticationCookie.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index a2ead34fca..273eca0654 100644 --- a/composer.json +++ b/composer.json @@ -58,7 +58,7 @@ "ext-xml": "*", "composer/ca-bundle": "^1.2", "fig/http-message-util": "^1.1", - "google/recaptcha": "^1.3", + "google/recaptcha": "^1.3 || ^2.0", "laminas/laminas-httphandlerrunner": "^2.6", "nikic/fast-route": "^1.3", "phpmyadmin/motranslator": "^6.0", diff --git a/composer.lock b/composer.lock index 678f101b02..7e25f98fd9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c762e0ae0305378a0054facb42660b57", + "content-hash": "3be3d2a6ff15cc672bb05ebb2b444126", "packages": [ { "name": "composer/ca-bundle", diff --git a/src/Plugins/Auth/AuthenticationCookie.php b/src/Plugins/Auth/AuthenticationCookie.php index 1008c5f1e6..5dd68a001c 100644 --- a/src/Plugins/Auth/AuthenticationCookie.php +++ b/src/Plugins/Auth/AuthenticationCookie.php @@ -240,7 +240,7 @@ class AuthenticationCookie extends AuthenticationPlugin if (function_exists('curl_init') && function_exists('curl_exec')) { $reCaptcha = new ReCaptcha\ReCaptcha( $config->config->CaptchaLoginPrivateKey, - new ReCaptcha\RequestMethod\CurlPost(null, $captchaSiteVerifyURL), + new ReCaptcha\RequestMethod\CurlPost(siteVerifyUrl: $captchaSiteVerifyURL), ); } elseif (ini_get('allow_url_fopen')) { $reCaptcha = new ReCaptcha\ReCaptcha( @@ -250,7 +250,7 @@ class AuthenticationCookie extends AuthenticationPlugin } else { $reCaptcha = new ReCaptcha\ReCaptcha( $config->config->CaptchaLoginPrivateKey, - new ReCaptcha\RequestMethod\SocketPost(null, $captchaSiteVerifyURL), + new ReCaptcha\RequestMethod\SocketPost(siteVerifyUrl: $captchaSiteVerifyURL), ); }