mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 18:26:32 +02:00
[feature/auth-refactor] Check that providers implement auth interface
PHPBB3-9734
This commit is contained in:
@@ -404,6 +404,12 @@ class phpbb_session
|
||||
$method = basename(trim($config['auth_method']));
|
||||
|
||||
$provider = $phpbb_container->get('auth.provider.' . $method);
|
||||
|
||||
if (!($provider instanceof phpbb_auth_provider_interface))
|
||||
{
|
||||
throw new \RuntimeException($provider . ' must implement phpbb_auth_provider_interface');
|
||||
}
|
||||
|
||||
$ret = $provider->validate_session($this->data);
|
||||
if ($ret !== null && !$ret)
|
||||
{
|
||||
|
Reference in New Issue
Block a user