Skip to content

Commit 6759123

Browse files
committed
Add commented Debug code
1 parent fdeb086 commit 6759123

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

interface/web/login/index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ function process_login_request(app $app, &$error, $conf, $module)
148148
$_SESSION['otp']['session_attempts'] = 0;
149149
$_SESSION['otp']['type'] = $user['otp_type'];
150150
$_SESSION['otp']['data'] = $user['otp_data'];
151+
//$_SESSION['otp']['recovery_debug'] = $user['otp_recovery']; // For DEBUG only.
151152

152153
//* Redirect to otp script
153154
header('Location: otp.php');

interface/web/login/otp.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ function finish_2fa_success($msg = '') {
134134
if(!isset($_SESSION['otp']['code']) || empty($_SESSION['otp']['code'])) {
135135
$new_otp_code = random_int(100000, 999999);
136136
$_SESSION['otp']['code_hash'] = password_hash($new_otp_code, PASSWORD_DEFAULT);
137+
//$_SESSION['otp']['code_debug'] = $new_otp_code; # for DEBUG only.
137138
$_SESSION['otp']['starttime'] = time();
138139
}
139140

@@ -197,7 +198,7 @@ function finish_2fa_success($msg = '') {
197198
$csrf_token = $app->auth->csrf_token_get('otp');
198199
$app->tpl->setVar('_csrf_id',$csrf_token['csrf_id']);
199200
$app->tpl->setVar('_csrf_key',$csrf_token['csrf_key']);
200-
#$app->tpl->setVar('msg', print_r($_SESSION['otp'], 1));
201+
//$app->tpl->setVar('msg', print_r($_SESSION['otp'], 1)); // For DEBUG only.
201202

202203
require ISPC_ROOT_PATH.'/web/login/lib/lang/'.$app->functions->check_language($conf['language']).'.lng';
203204
$app->tpl->setVar($wb);

0 commit comments

Comments
 (0)