diff --git a/CHANGELOG b/CHANGELOG index 1dec34bdc..25aee7cc2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fixed bug where session ID's length was limited to 40 characters (#1488196) - Added About tab in Settings - TinyMCE: - updated to 3.4.6 diff --git a/SQL/mssql.initial.sql b/SQL/mssql.initial.sql index a8d1a0b89..c14114100 100644 --- a/SQL/mssql.initial.sql +++ b/SQL/mssql.initial.sql @@ -81,7 +81,7 @@ CREATE TABLE [dbo].[identities] ( GO CREATE TABLE [dbo].[session] ( - [sess_id] [varchar] (32) COLLATE Latin1_General_CI_AI NOT NULL , + [sess_id] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL , [created] [datetime] NOT NULL , [changed] [datetime] NULL , [ip] [varchar] (40) COLLATE Latin1_General_CI_AI NOT NULL , diff --git a/SQL/mssql.upgrade.sql b/SQL/mssql.upgrade.sql index 70cf34d36..b479b1677 100644 --- a/SQL/mssql.upgrade.sql +++ b/SQL/mssql.upgrade.sql @@ -239,3 +239,6 @@ ALTER TABLE [dbo].[cache_messages] ADD CONSTRAINT [FK_cache_messages_user_id] ON DELETE CASCADE ON UPDATE CASCADE GO +ALTER TABLE [dbo].[session] ALTER COLUMN [sess_id] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL +GO + diff --git a/SQL/mysql.initial.sql b/SQL/mysql.initial.sql index 28a90f531..94679f202 100644 --- a/SQL/mysql.initial.sql +++ b/SQL/mysql.initial.sql @@ -6,7 +6,7 @@ -- Table structure for table `session` CREATE TABLE `session` ( - `sess_id` varchar(40) NOT NULL, + `sess_id` varchar(128) NOT NULL, `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `ip` varchar(40) NOT NULL, diff --git a/SQL/mysql.update.sql b/SQL/mysql.update.sql index 66045392d..053649b59 100644 --- a/SQL/mysql.update.sql +++ b/SQL/mysql.update.sql @@ -208,3 +208,5 @@ CREATE TABLE `cache_messages` ( INDEX `changed_index` (`changed`), PRIMARY KEY (`user_id`, `mailbox`, `uid`) ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; + +ALTER TABLE `session` CHANGE `sess_id` `sess_id` varchar(128) NOT NULL; diff --git a/SQL/postgres.initial.sql b/SQL/postgres.initial.sql index 06ecad4eb..3710dac4a 100644 --- a/SQL/postgres.initial.sql +++ b/SQL/postgres.initial.sql @@ -37,7 +37,7 @@ CREATE INDEX users_alias_id_idx ON users (alias); -- CREATE TABLE "session" ( - sess_id varchar(40) DEFAULT '' PRIMARY KEY, + sess_id varchar(128) DEFAULT '' PRIMARY KEY, created timestamp with time zone DEFAULT now() NOT NULL, changed timestamp with time zone DEFAULT now() NOT NULL, ip varchar(41) NOT NULL, diff --git a/SQL/postgres.update.sql b/SQL/postgres.update.sql index 2935cd483..d06ee8487 100644 --- a/SQL/postgres.update.sql +++ b/SQL/postgres.update.sql @@ -165,3 +165,5 @@ CREATE TABLE cache_messages ( ); CREATE INDEX cache_messages_changed_idx ON cache_messages (changed); + +ALTER TABLE "session" ALTER sess_id TYPE varchar(128); diff --git a/SQL/sqlite.initial.sql b/SQL/sqlite.initial.sql index 80c82a1a1..8c8da5c0f 100644 --- a/SQL/sqlite.initial.sql +++ b/SQL/sqlite.initial.sql @@ -110,7 +110,7 @@ CREATE INDEX ix_users_alias ON users(alias); -- CREATE TABLE session ( - sess_id varchar(40) NOT NULL PRIMARY KEY, + sess_id varchar(128) NOT NULL PRIMARY KEY, created datetime NOT NULL default '0000-00-00 00:00:00', changed datetime NOT NULL default '0000-00-00 00:00:00', ip varchar(40) NOT NULL default '', diff --git a/SQL/sqlite.update.sql b/SQL/sqlite.update.sql index 0193c7c39..e6b3ee125 100644 --- a/SQL/sqlite.update.sql +++ b/SQL/sqlite.update.sql @@ -282,3 +282,14 @@ CREATE TABLE cache_messages ( ); CREATE INDEX ix_cache_messages_changed ON cache_messages (changed); + +DROP TABLE session; +CREATE TABLE session ( + sess_id varchar(128) NOT NULL PRIMARY KEY, + created datetime NOT NULL default '0000-00-00 00:00:00', + changed datetime NOT NULL default '0000-00-00 00:00:00', + ip varchar(40) NOT NULL default '', + vars text NOT NULL +); + +CREATE INDEX ix_session_changed ON session (changed);