diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-11-13 17:40:09 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-11-13 17:40:09 +0000 |
commit | a3fab0edade68b9748d40b04bc7b48ee69b7fe3e (patch) | |
tree | dcac5482faaaa924fc82b853662b5353ffda863d /modules/system/system.install | |
parent | 0828119240f45b9cdcb63426db4bda9183f51052 (diff) | |
download | brdo-a3fab0edade68b9748d40b04bc7b48ee69b7fe3e.tar.gz brdo-a3fab0edade68b9748d40b04bc7b48ee69b7fe3e.tar.bz2 |
#575280 follow-up by mfb, carlos8f: Empty session IDs break Drupal. (courtesty of BADCamp 2010 woo)
Diffstat (limited to 'modules/system/system.install')
-rw-r--r-- | modules/system/system.install | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index 94c0bb2ee..ad76e11be 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -2911,7 +2911,10 @@ function system_update_7065() { 'length' => 128, 'not null' => TRUE, ); - db_change_field('sessions', 'sid', 'sid', $spec); + db_drop_primary_key('sessions'); + db_change_field('sessions', 'sid', 'sid', $spec, array('primary key' => array('sid', 'ssid'))); + // Delete any sessions with empty session ID. + db_delete('sessions')->condition('sid', '')->execute(); } /** |