Commit 4175c119 authored by Matthew Taylor's avatar Matthew Taylor

apply path explicitly rather than in `defaults`

This should fix #1455 by preventing the path from being changes via opts passed in, even though we don’t pass in a `path` anywhere.
parent e119cea6
......@@ -72,9 +72,9 @@ var Jar = {
},
set: function (name, value, opts) {
defaults(opts, {
expires: new Date(new Date().setYear(new Date().getFullYear() + 1)),
path: '/'
expires: new Date(new Date().setYear(new Date().getFullYear() + 1))
});
opts.path = '/';
var obj = cookie.serialize(name, value, opts);
document.cookie = obj;
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment