This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
$browser.cookies reads the wrong cookie value when there are multiple values for a cookie #2635
Closed
Description
Consider the case where a cookie, foo
has the value r_value
at the root path /
, and another value, say, p_value
at a subpath /path
.
document.cookie
will contains both values for the cooke for an application served under the /foo
path. The value for the more specific path, /foo
, will appear first in the list and the other less specific value will appear later.
angular currently uses the last seen value of the cookie but should use the first value. The becomes a bigger issue when coupled with the automatic XSRF protection that's provided in conjunction with the XSRF-TOKEN
cookie. Currently, if a value for this cookie is set on the root path, then that value is always used for applications at any other path.
I'm working on a fix.
Metadata
Metadata
Assignees
Labels
No labels