MediaWiki r34083 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r34082‎ | r34083 (on ViewVC)‎ | r34084 >
Date:20:25, 1 May 2008
Author:brion
Status:old
Tags:
Comment:
* (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.
Modified paths:

Diff [purge]

Loading diff…

Status & tagging log

  • 15:26, 12 September 2011 Meno25 (talk | contribs) changed the status of r34083 [removed: ok added: old]