mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[feature/oauth] OAuth init method to minimally validate entered data
PHPBB3-11673
This commit is contained in:
@@ -103,6 +103,24 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||
$this->service_providers = $service_providers;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
// This does not test whether or not the key and secret provided are valid.
|
||||
foreach ($this->service_providers as $service_provider)
|
||||
{
|
||||
$credentials = $service_provider->get_service_credentials();
|
||||
|
||||
if (($credentials['key'] && !$credentials['secret']) || (!$credentials['key'] && $credentials['secret']))
|
||||
{
|
||||
return $this->user->lang['AUTH_PROVIDER_OAUTH_ERROR_ELEMENT_MISSING'];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
Reference in New Issue
Block a user