From 018da09ac5ce56091c6cc621906528468208c52c Mon Sep 17 00:00:00 2001 From: Zankaria Date: Tue, 26 Mar 2024 14:16:19 +0100 Subject: [PATCH] Fix CaptchaQueries naming --- inc/service/captcha-queries.php | 4 ++-- post.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/service/captcha-queries.php b/inc/service/captcha-queries.php index 8f9342dc..d7966501 100644 --- a/inc/service/captcha-queries.php +++ b/inc/service/captcha-queries.php @@ -19,7 +19,7 @@ class RemoteCaptchaQuery { * @param string $secret Server side secret. * @return CaptchaRemoteQueries A new captcha query instance. */ - public static function with_recaptcha(HttpDriver $http, string $secret): RemoteCaptchaQuery { + public static function withRecaptcha(HttpDriver $http, string $secret): RemoteCaptchaQuery { return new self($http, $secret, 'https://www.google.com/recaptcha/api/siteverify'); } @@ -30,7 +30,7 @@ class RemoteCaptchaQuery { * @param string $secret Server side secret. * @return CaptchaRemoteQueries A new captcha query instance. */ - public static function with_hcaptcha(HttpDriver $http, string $secret): RemoteCaptchaQuery { + public static function withHCaptcha(HttpDriver $http, string $secret): RemoteCaptchaQuery { return new self($http, $secret, 'https://hcaptcha.com/siteverify'); } diff --git a/post.php b/post.php index ae1e9001..693786f5 100644 --- a/post.php +++ b/post.php @@ -590,7 +590,7 @@ if (isset($_POST['delete'])) { error($config['error']['bot']); } $response = $_POST['g-recaptcha-response']; - $query = RemoteCaptchaQuery::with_recaptcha($context->getHttpDriver(), $config['recaptcha_private']); + $query = RemoteCaptchaQuery::withRecaptcha($context->getHttpDriver(), $config['recaptcha_private']); } // hCaptcha elseif ($config['hcaptcha']) { @@ -598,7 +598,7 @@ if (isset($_POST['delete'])) { error($config['error']['bot']); } $response = $_POST['g-recaptcha-response']; - $query = RemoteCaptchaQuery::with_hcaptcha($context->getHttpDriver(), $config['hcaptcha_private']); + $query = RemoteCaptchaQuery::withHCaptcha($context->getHttpDriver(), $config['hcaptcha_private']); } $success = $query->verify($response, $_SERVER['REMOTE_ADDR']);