mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/17414] Remove request data from validate call
PHPBB-17414
This commit is contained in:
parent
6a34de543b
commit
2a6609013d
4 changed files with 5 additions and 6 deletions
|
@ -293,7 +293,7 @@ class ucp_register
|
||||||
|
|
||||||
if ($config['enable_confirm'])
|
if ($config['enable_confirm'])
|
||||||
{
|
{
|
||||||
$vc_response = $captcha->validate($data);
|
$vc_response = $captcha->validate();
|
||||||
if ($vc_response !== false)
|
if ($vc_response !== false)
|
||||||
{
|
{
|
||||||
$error[] = $vc_response;
|
$error[] = $vc_response;
|
||||||
|
|
|
@ -177,7 +177,7 @@ class db extends base
|
||||||
if ($show_captcha)
|
if ($show_captcha)
|
||||||
{
|
{
|
||||||
$captcha->init(CONFIRM_LOGIN);
|
$captcha->init(CONFIRM_LOGIN);
|
||||||
$vc_response = $captcha->validate($row);
|
$vc_response = $captcha->validate();
|
||||||
if ($vc_response)
|
if ($vc_response)
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
|
|
@ -90,11 +90,11 @@ class legacy_wrapper implements plugin_interface
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public function validate(array $request_data): bool
|
public function validate(): bool
|
||||||
{
|
{
|
||||||
if (method_exists($this->legacy_captcha, 'validate'))
|
if (method_exists($this->legacy_captcha, 'validate'))
|
||||||
{
|
{
|
||||||
$error = $this->legacy_captcha->validate($request_data);
|
$error = $this->legacy_captcha->validate();
|
||||||
if ($error)
|
if ($error)
|
||||||
{
|
{
|
||||||
$this->last_error = $error;
|
$this->last_error = $error;
|
||||||
|
|
|
@ -62,10 +62,9 @@ interface plugin_interface
|
||||||
/**
|
/**
|
||||||
* Validate the captcha with the given request data
|
* 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
|
* @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
|
* Return whether captcha was solved
|
||||||
|
|
Loading…
Add table
Reference in a new issue