fix typo in varchar length of selector field of new panel_2fa_tokens table, thx to Davidd

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann 2024-08-14 20:24:24 +02:00
parent a60c21218c
commit 19995f4345
No known key found for this signature in database
GPG Key ID: C121F97338D7A352
4 changed files with 15 additions and 3 deletions

View File

@ -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

View File

@ -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,

View File

@ -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');
}

View File

@ -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 = '';