* (bug 13905) Blacklist Mac IE from HttpOnly cookies; it eats them sometimes
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 1 May 2008 20:25:17 +0000 (20:25 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 1 May 2008 20:25:17 +0000 (20:25 +0000)
commit6b16f4410897653ec571fbf1f731da5338da1486
tree14c33c689300dccc3129026245a45b85f9154929
parent5da81d81c5da858b9de1dce83e251d6b8e8c0d7d
* (bug 13905) Blacklist Mac IE from HttpOnly cookies; it eats them sometimes

God I wish this browser would finish dying. :D

The particular situation was that the session cookie was getting eaten as "disabled", thus not sent back to the server so your session state never quite happened. Other cookies on submit seemed to come in intact, but without the session cookie you'd get a big fat error message, even if you set the long-term login cookie option.

Mac/IE seems to always *see* the HttpOnly cookies, but it sometimes marks them as "disabled". It seems to be incorrectly parsing the options after the path, sometimes seeing "/;" as the path instead of "/". Failure is more likely if there's no expiration option (as with the session cookie), or if there *is* a secure option set.

Anyway, just set up a user-agent blacklist $wgHttpOnlyBlacklist and copied the Mac/IE entry over. The HttpOnly setting now gets ignored for blacklist hits as well as for old PHP versions, the check being encapsulated into wfHttpOnlySafe().

Also added some logging for cookie settings, around the setcookie() and session_set_cookie_params() calls.
RELEASE-NOTES
includes/DefaultSettings.php
includes/GlobalFunctions.php
includes/User.php