diff --git a/index.php b/index.php index 3ee8b942..4251ff9e 100644 --- a/index.php +++ b/index.php @@ -394,6 +394,9 @@ if ($action == '2fa_entercode') { } exit(); } + // not found or invalid, this cookie is useless, get rid of it + unset($_COOKIE['frx_2fa_remember']); + setcookie('frx_2fa_remember', "", time()-3600); } // redirect to code-enter-page diff --git a/install/froxlor.sql.php b/install/froxlor.sql.php index 65769e20..701cb588 100644 --- a/install/froxlor.sql.php +++ b/install/froxlor.sql.php @@ -731,7 +731,7 @@ opcache.validate_timestamps'), ('panel', 'settings_mode', '0'), ('panel', 'menu_collapsed', '1'), ('panel', 'version', '2.2.0-rc3'), - ('panel', 'db_version', '202407200'); + ('panel', 'db_version', '202408140'); DROP TABLE IF EXISTS `panel_tasks`; @@ -1054,7 +1054,7 @@ CREATE TABLE `panel_loginlinks` ( DROP TABLE IF EXISTS `panel_2fa_tokens`; CREATE TABLE `panel_2fa_tokens` ( `id` int(11) NOT NULL auto_increment, - `selector` varchar(20) NOT NULL, + `selector` varchar(200) NOT NULL, `token` varchar(200) NOT NULL, `userid` int(11) NOT NULL default '0', `valid_until` int(15) NOT NULL, diff --git a/install/updates/froxlor/update_2.2.inc.php b/install/updates/froxlor/update_2.2.inc.php index e84786c3..27dc4d15 100644 --- a/install/updates/froxlor/update_2.2.inc.php +++ b/install/updates/froxlor/update_2.2.inc.php @@ -150,3 +150,12 @@ if (Froxlor::isFroxlorVersion('2.2.0-rc2')) { Update::showUpdateStep("Updating from 2.2.0-rc2 to 2.2.0-rc3", false); Froxlor::updateToVersion('2.2.0-rc3'); } + +if (Froxlor::isDatabaseVersion('202407200')) { + + Update::showUpdateStep("Adjusting field in 2fa-token table"); + Database::query("ALTER TABLE `panel_2fa_tokens` CHANGE COLUMN `selector` `selector` varchar(200) NOT NULL;"); + Update::lastStepStatus(0); + + Froxlor::updateToDbVersion('202408140'); +} diff --git a/lib/Froxlor/Froxlor.php b/lib/Froxlor/Froxlor.php index aa06a15d..78894a6b 100644 --- a/lib/Froxlor/Froxlor.php +++ b/lib/Froxlor/Froxlor.php @@ -34,7 +34,7 @@ final class Froxlor const VERSION = '2.2.0-rc3'; // Database version (YYYYMMDDC where C is a daily counter) - const DBVERSION = '202407200'; + const DBVERSION = '202408140'; // Distribution branding-tag (used for Debian etc.) const BRANDING = '';