-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Bug in paul999\tfa\helper\session_helper.php
Missing code in public function is_tfa_required, between MODE_REQUIRED_FOR_ACP_LOGIN and MODE_REQUIRED_FOR_ADMIN, is basically making those settings identical.
return ($admin); should work?
Suggested solution:
public function is_tfa_required($user_id, $admin = false, $userdata = array())
{
if (sizeof($this->get_modules()) == 0)
{
return false;
}
switch ($this->config['tfa_mode'])
{
case session_helper_interface::MODE_DISABLED:
return false;
case session_helper_interface::MODE_NOT_REQUIRED:
return $this->is_tfa_registered($user_id);
case session_helper_interface::MODE_REQUIRED_FOR_ACP_LOGIN:
return ($admin);
case session_helper_interface::MODE_REQUIRED_FOR_ADMIN:
return $this->do_permission_check($user_id, $userdata, 'a_');
case session_helper_interface::MODE_REQUIRED_FOR_MODERATOR:
return $this->do_permission_check($user_id, $userdata, array('m_', 'a_'));
case session_helper_interface::MODE_REQUIRED:
return true;
default:
return false;
}
Metadata
Metadata
Assignees
Labels
No labels