https://bugzilla.wikimedia.org/show_bug.cgi?id=49156
Web browser: ---
Bug ID: 49156
Summary: Add mediawiki.cookie module to allow reading and
writing cookies with correct settings
Product: MediaWiki
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: JavaScript
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
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.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l