From 9eb18f351bd41e3917f43ca09569043905fc2c6a Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 15 Oct 2024 20:09:21 +0200 Subject: [PATCH] [ticket/17413] Fix setting solved state on valid confirm code PHPBB-17413 --- phpBB/phpbb/captcha/plugins/base.php | 1 + phpBB/phpbb/captcha/plugins/turnstile.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/phpbb/captcha/plugins/base.php b/phpBB/phpbb/captcha/plugins/base.php index d43fcec31e..25355bcb53 100644 --- a/phpBB/phpbb/captcha/plugins/base.php +++ b/phpBB/phpbb/captcha/plugins/base.php @@ -87,6 +87,7 @@ abstract class base implements plugin_interface { if ($this->confirm_id && hash_equals($this->code, $this->confirm_code)) { + $this->solved = true; return true; } diff --git a/phpBB/phpbb/captcha/plugins/turnstile.php b/phpBB/phpbb/captcha/plugins/turnstile.php index 17e4154e8a..70c33e6e21 100644 --- a/phpBB/phpbb/captcha/plugins/turnstile.php +++ b/phpBB/phpbb/captcha/plugins/turnstile.php @@ -189,7 +189,7 @@ class turnstile extends base 'TURNSTILE_SITEKEY' => $this->config->offsetGet('captcha_turnstile_sitekey'), 'TURNSTILE_THEME' => $this->config->offsetGet('captcha_turnstile_theme'), 'U_TURNSTILE_SCRIPT' => self::SCRIPT_URL, - 'CONFIRM_TYPE_REGISTRATION' => (int) $this->type->value, + 'CONFIRM_TYPE_REGISTRATION' => $this->type->value, ]); return 'captcha_turnstile.html';