implement 2fa remember browser, fixes #1259

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2024-07-20 10:16:48 +02:00
parent bda24d7d63
commit 2dae780e0b
9 changed files with 98 additions and 11 deletions

View File

@@ -171,8 +171,9 @@ final class MasterCron extends CliCommand
FroxlorLogger::getInstanceOf()->setCronLog(0);
}
// clean up possible old login-links
// clean up possible old login-links and 2fa tokens
Database::query("DELETE FROM `" . TABLE_PANEL_LOGINLINKS . "` WHERE `valid_until` < UNIX_TIMESTAMP()");
Database::query("DELETE FROM `" . TABLE_PANEL_2FA_TOKENS . "` WHERE `valid_until` < UNIX_TIMESTAMP()");
return $result;
}

View File

@@ -34,7 +34,7 @@ final class Froxlor
const VERSION = '2.2.0-rc1';
// Database version (YYYYMMDDC where C is a daily counter)
const DBVERSION = '202401090';
const DBVERSION = '202407200';
// Distribution branding-tag (used for Debian etc.)
const BRANDING = '';

View File

@@ -57,3 +57,4 @@ const TABLE_PANEL_PLANS = 'panel_plans';
const TABLE_API_KEYS = 'api_keys';
const TABLE_PANEL_USERCOLUMNS = 'panel_usercolumns';
const TABLE_PANEL_LOGINLINKS = 'panel_loginlinks';
const TABLE_PANEL_2FA_TOKENS = 'panel_2fa_tokens';