Closed
Bug 309595
Opened 19 years ago
Closed 19 years ago
relative cookie paths don't seem to work from javascript
Categories
(Core :: Networking: Cookies, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: timeless, Assigned: darin.moz)
References
()
Details
(Keywords: qawanted)
http://www.howtocreate.co.uk/tutorials/index.php?tut=0&part=20 seems to indicate path=../ should work notes: tested vendor branch of mozilla1.8 branch. i will confirm this bug if no one responds to it within some random time period.
Comment 1•19 years ago
|
||
I can't find anything from an even mildly authoritative source that suggests that relative paths are allowed. AFAICT, document.cookie's path attribute is absolute (i.e., a simple prefix operation). From JavaScript: the Definitive Guide, 4th Ed., p. 267: [...]For example, if a cookie set by http://www.acme.com/catalog/widgets/index.html has its path set to "/catalog", that cookie is also visible to http://www.acme.com/catalog/order.html. Or, if the path is set to "/", the cookie is visible to any page on the www.acme.com web server. See also http://wp.netscape.com/newsref/std/cookie_spec.html which makes no mention of relative paths.
Comment 4•19 years ago
|
||
I can't test with the url testcase, it gives js errors in IE6. Instead I tested with this: javascript:document.cookie="test=case;path=../";alert(document.cookie) This doesn't seem to work in IE6, afaict. No cookie is set.
Comment 5•19 years ago
|
||
OK, so I'm going to claim this site is on crack.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•