Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

+18 -6
View File
@@ -11,7 +11,7 @@
namespace IPS\MFA;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -52,7 +52,20 @@ abstract class _MFAHandler
'questions' => new \IPS\MFA\SecurityQuestions\Handler()
);
}
/**
* Removes any previous authentication settings for this user
*
* @return void
*/
public static function resetAuthentication()
{
if ( isset( $_SESSION['MFAAuthenticated'] ) )
{
unset( $_SESSION['MFAAuthenticated'] );
}
}
/**
* Display output when trying to access an area
*
@@ -73,7 +86,7 @@ abstract class _MFAHandler
}
/* If MFA is not enabled for this area, do nothing */
if ( !\IPS\Settings::i()->security_questions_areas or !in_array( "{$app}_{$area}", explode( ',', \IPS\Settings::i()->security_questions_areas ) ) )
if ( !\IPS\Settings::i()->security_questions_areas or !\in_array( "{$app}_{$area}", explode( ',', \IPS\Settings::i()->security_questions_areas ) ) )
{
return NULL;
}
@@ -150,7 +163,7 @@ abstract class _MFAHandler
/* Display */
$knownDevicesAvailable = FALSE;
if ( $app === 'core' and $area === 'AuthenticateFront' and !in_array( "app_AuthenticateFrontKnown", explode( ',', \IPS\Settings::i()->security_questions_areas ) ) )
if ( $app === 'core' and $area === 'AuthenticateFront' and !\in_array( "app_AuthenticateFrontKnown", explode( ',', \IPS\Settings::i()->security_questions_areas ) ) )
{
if ( \IPS\Db::i()->select( 'COUNT(*)', 'core_members_known_devices', array( 'member_id=?', $member->member_id ) )->first() )
{
@@ -188,7 +201,7 @@ abstract class _MFAHandler
\IPS\Session::i()->csrfCheck();
foreach ( $acceptableHandlers as $key => $handler )
{
if ( ( count( $acceptableHandlers ) == 1 ) or $key == \IPS\Request::i()->mfa_method )
if ( ( \count( $acceptableHandlers ) == 1 ) or $key == \IPS\Request::i()->mfa_method )
{
if ( $handler->configurationScreenSubmit( $member ) )
{
@@ -371,7 +384,6 @@ abstract class _MFAHandler
* Configuration options when editing member account in ACP
*
* @param \IPS\Member $member The member
* @param \IPS\Helpers\Form $form Set to TRUE if multiple options are being displayed
* @return array
*/
public function acpConfiguration( \IPS\Member $member )