Commit 241cb08d authored by Dries's avatar Dries
Browse files

- Patch #78732 by dopry: made it possible to use sha1 session ids

parent d54ccd4f
...@@ -391,7 +391,7 @@ function system_install() { ...@@ -391,7 +391,7 @@ function system_install() {
db_query("CREATE TABLE {sessions} ( db_query("CREATE TABLE {sessions} (
uid int unsigned NOT NULL, uid int unsigned NOT NULL,
sid varchar(32) NOT NULL default '', sid varchar(64) NOT NULL default '',
hostname varchar(128) NOT NULL default '', hostname varchar(128) NOT NULL default '',
timestamp int NOT NULL default '0', timestamp int NOT NULL default '0',
cache int NOT NULL default '0', cache int NOT NULL default '0',
...@@ -822,7 +822,7 @@ function system_install() { ...@@ -822,7 +822,7 @@ function system_install() {
db_query("CREATE TABLE {sessions} ( db_query("CREATE TABLE {sessions} (
uid int_unsigned NOT NULL, uid int_unsigned NOT NULL,
sid varchar(32) NOT NULL default '', sid varchar(64) NOT NULL default '',
hostname varchar(128) NOT NULL default '', hostname varchar(128) NOT NULL default '',
timestamp int NOT NULL default '0', timestamp int NOT NULL default '0',
cache int NOT NULL default '0', cache int NOT NULL default '0',
...@@ -3323,6 +3323,20 @@ function system_update_1012() { ...@@ -3323,6 +3323,20 @@ function system_update_1012() {
return $ret; return $ret;
} }
function system_update_1013() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql('ALTER TABLE {sessions} CHANGE COLUMN sid sid varchar(64)');
break;
case 'pgsql':
$ret[] = update_sql('ALTER TABLE {sessions} ALTER COLUMN sid TYPE varchar(64)');
break;
}
return $ret;
}
/** /**
* @} End of "defgroup updates-4.7-to-x.x" * @} End of "defgroup updates-4.7-to-x.x"
* The next series of updates should start at 2000. * The next series of updates should start at 2000.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment