diff options
author | Mario <mario@mariovavti.com> | 2023-03-08 13:15:33 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-03-08 13:15:33 +0000 |
commit | 3de81877c6aaacfad993375bcf88b512958180ab (patch) | |
tree | c1310b213b4d00dbff46382849956fc5a838c28d | |
parent | 2665b34962ce004233ce64c837f1a7b9f842ecab (diff) | |
download | volse-hubzilla-3de81877c6aaacfad993375bcf88b512958180ab.tar.gz volse-hubzilla-3de81877c6aaacfad993375bcf88b512958180ab.tar.bz2 volse-hubzilla-3de81877c6aaacfad993375bcf88b512958180ab.zip |
more mfa cleanup
-rw-r--r-- | Zotlabs/Module/Totp_check.php | 7 | ||||
-rw-r--r-- | include/auth.php | 3 | ||||
-rw-r--r-- | view/tpl/totp.tpl | 5 |
3 files changed, 8 insertions, 7 deletions
diff --git a/Zotlabs/Module/Totp_check.php b/Zotlabs/Module/Totp_check.php index c0b38a513..8212d3716 100644 --- a/Zotlabs/Module/Totp_check.php +++ b/Zotlabs/Module/Totp_check.php @@ -62,8 +62,8 @@ class Totp_check extends Controller { public function get() { - if (!local_channel()) { - return; + if (!local_channel() || App::$module === 'totp_check') { + goaway(z_root()); } $account = App::get_account(); @@ -78,8 +78,7 @@ class Totp_check extends Controller { '$header' => t('Multifactor Verification'), '$id' => $id, '$desc' => t('Please enter the verification key from your authenticator app'), - '$submit' => t('Verify'), - '$static' => $static + '$submit' => t('Verify') ] ); } diff --git a/include/auth.php b/include/auth.php index 0ea7b3dba..5956b89e2 100644 --- a/include/auth.php +++ b/include/auth.php @@ -11,6 +11,7 @@ use Zotlabs\Lib\Libzot; use Zotlabs\Lib\AConfig; +use Zotlabs\Module\Totp_check; require_once('include/api_auth.php'); require_once('include/security.php'); @@ -267,7 +268,7 @@ if((isset($_SESSION)) && (x($_SESSION, 'authenticated')) && $multiFactor = AConfig::Get(App::$account['account_id'], 'system', 'mfa_enabled'); if ($multiFactor && empty($_SESSION['2FA_VERIFIED']) && App::$module !== 'totp_check') { - $o = new Zotlabs\Module\Totp_check; + $o = new Totp_check; echo $o->get(); killme(); } diff --git a/view/tpl/totp.tpl b/view/tpl/totp.tpl index d58f880cd..1f3b1cfc7 100644 --- a/view/tpl/totp.tpl +++ b/view/tpl/totp.tpl @@ -3,12 +3,13 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0"> <head> - <link rel="stylesheet" href="vendor/twbs/bootstrap/dist/css/bootstrap.min.css" type="text/css" media="screen"> + <link rel="stylesheet" href="/vendor/twbs/bootstrap/dist/css/bootstrap.min.css" type="text/css" media="screen"> + <link rel="stylesheet" href="/library/fork-awesome/css/fork-awesome.min.css" type="text/css" media="screen"> </head> <body> <nav class="navbar bg-body-tertiary"> <div class="container-sm"> - <span class="navbar-brand">{{$header}}</span> + <span class="navbar-brand"><i class="fa fa-fw fa-hubzilla"></i>{{$header}}</span> </div> </nav> <main class="container-sm mt-4"> |