[ticket/17414] Remove request data from validate call

PHPBB-17414
This commit is contained in:
Marc Alexander 2024-10-11 21:28:30 +02:00
parent 6a34de543b
commit 2a6609013d
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
4 changed files with 5 additions and 6 deletions

View file

@ -293,7 +293,7 @@ class ucp_register
if ($config['enable_confirm'])
{
$vc_response = $captcha->validate($data);
$vc_response = $captcha->validate();
if ($vc_response !== false)
{
$error[] = $vc_response;

View file

@ -177,7 +177,7 @@ class db extends base
if ($show_captcha)
{
$captcha->init(CONFIRM_LOGIN);
$vc_response = $captcha->validate($row);
$vc_response = $captcha->validate();
if ($vc_response)
{
return array(

View file

@ -90,11 +90,11 @@ class legacy_wrapper implements plugin_interface
/**
* {@inheritDoc}
*/
public function validate(array $request_data): bool
public function validate(): bool
{
if (method_exists($this->legacy_captcha, 'validate'))
{
$error = $this->legacy_captcha->validate($request_data);
$error = $this->legacy_captcha->validate();
if ($error)
{
$this->last_error = $error;

View file

@ -62,10 +62,9 @@ interface plugin_interface
/**
* Validate the captcha with the given request data
*
* @param array $request_data Request data for the captcha
* @return bool True if request data was valid captcha reply, false if not
*/
public function validate(array $request_data): bool;
public function validate(): bool;
/**
* Return whether captcha was solved