From 281ac3625864eb5f037395376b4b40fe69f789da Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 9 Dec 2014 21:42:46 +0100 Subject: [PATCH] Properly prevent session fixation in every case --- com.woltlab.wcf/update_2.1.0_alpha_1.sql | 4 +- .../editor/MySQLDatabaseEditor.class.php | 2 + .../editor/PostgreSQLDatabaseEditor.class.php | 2 + .../system/database/util/SQLParser.class.php | 10 ++- .../system/session/SessionHandler.class.php | 74 +++++++++++-------- wcfsetup/setup/db/install.sql | 2 +- 6 files changed, 58 insertions(+), 36 deletions(-) diff --git a/com.woltlab.wcf/update_2.1.0_alpha_1.sql b/com.woltlab.wcf/update_2.1.0_alpha_1.sql index 7e53bdec6a..c73c93fe1a 100644 --- a/com.woltlab.wcf/update_2.1.0_alpha_1.sql +++ b/com.woltlab.wcf/update_2.1.0_alpha_1.sql @@ -251,7 +251,7 @@ ALTER TABLE wcf1_paid_subscription_transaction_log ADD FOREIGN KEY (userID) REFE ALTER TABLE wcf1_paid_subscription_transaction_log ADD FOREIGN KEY (subscriptionID) REFERENCES wcf1_paid_subscription (subscriptionID) ON DELETE SET NULL; ALTER TABLE wcf1_paid_subscription_transaction_log ADD FOREIGN KEY (paymentMethodObjectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE; -ALTER TABLE wcf1_session_virtual ADD FOREIGN KEY (sessionID) REFERENCES wcf1_session (sessionID) ON DELETE CASCADE; +ALTER TABLE wcf1_session_virtual ADD FOREIGN KEY (sessionID) REFERENCES wcf1_session (sessionID) ON DELETE CASCADE ON UPDATE CASCADE; ALTER TABLE wcf1_user_group_assignment ADD FOREIGN KEY (groupID) REFERENCES wcf1_user_group (groupID) ON DELETE CASCADE; @@ -297,4 +297,4 @@ UPDATE wcf1_bbcode_media_provider SET html = '