1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-12 17:07:23 +01:00

Use persistent_login plugin's "Auth Token" support for Roundcube. The old way was very insecure and is subject to dictionary attack of the unsalted encrypted password stored in a browser cookie.

This commit is contained in:
downtownallday
2022-01-29 15:22:01 -05:00
parent 54dc06416b
commit fd2ff00a6e
2 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
PRAGMA foreign_keys = ON;
CREATE TABLE IF NOT EXISTS `auth_tokens` (
`token` TEXT NOT NULL,
`expires` TEXT NOT NULL,
`user_id` INTEGER NOT NULL,
`user_name` TEXT NOT NULL,
`user_pass` TEXT NOT NULL,
`host` TEXT NOT NULL,
PRIMARY KEY(`token`),
FOREIGN KEY(`user_id`) REFERENCES `users`(`user_id`) ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS `user_id_fk_auth_tokens` ON `auth_tokens`(`user_id`);