Last modified: 2014-05-16 21:38:56 UTC
We should add a mediawiki.cookie module to correctly read (though this case is trivial) and write cookies with the right settings. We have six variables controlling this ($wgCookiePath, $wgCookiePrefix, $wgCookieDomain, $wgCookieSecure, $wgCookieExpiration, $wgCookieHttpOnly). Only wgCookiePrefix is currently exposed. Requiring code to use jQuery.cookie directly means they generally get these settings wrong, and sometimes don't set the path at all (meaning it will often fork into /w/ and /wiki/, and perhaps more). We should provide a write wrapper that's as close to WebResponse->setcookie as possible, with necessary exceptions (e.g. HTTP-only doesn't make sense, since it wouldn't work). A read wrapper is useful for convenience, so you can use the same module for both.
Change 120806 had a related patch set uploaded by Phuedx: [WIP] Add the mw.cookie module https://gerrit.wikimedia.org/r/120806
Change 120806 merged by Robmoen: Implement mediawiki.cookie module https://gerrit.wikimedia.org/r/120806
I think this only needs to go in 1.24, unless someone needs it backported.