1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[feature/oauth] Properly check that all data needed is available

PHPBB3-11673
This commit is contained in:
Joseph Warner
2013-07-29 13:10:56 -04:00
parent bcdeafedd7
commit c09bda10fc
3 changed files with 29 additions and 3 deletions

View File

@@ -33,7 +33,9 @@ class ucp_login_link
$auth_provider = $phpbb_container->get($auth_provider);
// Initialize necessary variables
$login_error = null;
$login_link_error = null;
$login_username = null;
// Build the data array
$data = $this->get_login_link_data_array();
@@ -45,10 +47,14 @@ class ucp_login_link
}
// Have the authentication provider check that all necessary data is available
$result = $auth_provider->login_link_has_necessary_data($data);
if ($result !== null)
{
$login_link_error = $user->lang[$result];
}
// Perform link action if there is no error
if (!login_link_error)
if (!$login_link_error)
{
if ($request->is_set_post('login'))
{
@@ -143,7 +149,8 @@ class ucp_login_link
{
if (strpos($var_name, 'login_link_') === 0)
{
$login_link_data[$var_name] = $request->variable($var_name, '', false, phpbb_request_interface::GET);
$key_name = str_replace('login_link_', '', $var_name);
$login_link_data[$key_name] = $request->variable($var_name, '', false, phpbb_request_interface::GET);
}
}