Skip to content

Commit

Permalink
fix typo in varchar length of selector field of new panel_2fa_tokens …
Browse files Browse the repository at this point in the history
…table, thx to Davidd

Signed-off-by: Michael Kaufmann <[email protected]>
  • Loading branch information
d00p committed Aug 14, 2024
1 parent a60c212 commit 19995f4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
3 changes: 3 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,9 @@
}
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
Expand Down
4 changes: 2 additions & 2 deletions install/froxlor.sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@
('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`;
Expand Down Expand Up @@ -1054,7 +1054,7 @@
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,
Expand Down
9 changes: 9 additions & 0 deletions install/updates/froxlor/update_2.2.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,12 @@
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');
}
2 changes: 1 addition & 1 deletion lib/Froxlor/Froxlor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down

0 comments on commit 19995f4

Please sign in to comment.