diff --git a/phpBB/phpbb/captcha/plugins/legacy_wrapper.php b/phpBB/phpbb/captcha/plugins/legacy_wrapper.php index e57abbb967..5f2c701e07 100644 --- a/phpBB/phpbb/captcha/plugins/legacy_wrapper.php +++ b/phpBB/phpbb/captcha/plugins/legacy_wrapper.php @@ -74,6 +74,19 @@ class legacy_wrapper implements plugin_interface } } + /** + * {@inheritDoc} + */ + public function get_hidden_fields(): array + { + if (method_exists($this->legacy_captcha, 'get_hidden_fields')) + { + return $this->legacy_captcha->get_hidden_fields(); + } + + return []; + } + /** * {@inheritDoc} */ diff --git a/phpBB/phpbb/captcha/plugins/plugin_interface.php b/phpBB/phpbb/captcha/plugins/plugin_interface.php index 41e825fad3..9286c4867e 100644 --- a/phpBB/phpbb/captcha/plugins/plugin_interface.php +++ b/phpBB/phpbb/captcha/plugins/plugin_interface.php @@ -52,6 +52,13 @@ interface plugin_interface */ public function init(int $type): void; + /** + * Get hidden form fields for this captcha plugin + * + * @return array Hidden form fields + */ + public function get_hidden_fields(): array; + /** * Validate the captcha with the given request data *