From 358793e47be8795ba4f6e21b58d2977ff7684767 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 25 Apr 2007 18:38:11 +0000 Subject: [PATCH] * (bug 3826) Normalize some invalid cookie name characters when setting up $wgCookiePrefix. Completes application of patch by Anders Kaseorg. --- RELEASE-NOTES | 3 +++ includes/Setup.php | 1 + 2 files changed, 4 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index ac4b6cd6ae..f77ad24db6 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -347,6 +347,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Disable MySQL's strict mode at session start for MySQL 4.1+, to avoid the various problems that occur when it is on. * (bug 9585) Fix regression in tidy usage in Special:Undelete previews +* (bug 3826) Normalize some invalid cookie name characters when setting + up $wgCookiePrefix. Completes application of patch by Anders Kaseorg. + == Maintenance == diff --git a/includes/Setup.php b/includes/Setup.php index eaffbe1e5a..47ba494f60 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -133,6 +133,7 @@ if ( $wgDBprefix ) { } else { $wgCookiePrefix = $wgDBname; } +$wgCookiePrefix = strtr($wgCookiePrefix, "=,; +.\"'\\[", "__________"); # If session.auto_start is there, we can't touch session name # -- 2.20.1