mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1239671
- Don't let session store override persistent cookies, r=ehsan
This commit is contained in:
parent
3f0174c897
commit
90895cb453
@ -117,10 +117,17 @@ var SessionCookiesInternal = {
|
||||
restore(cookies) {
|
||||
for (let cookie of cookies) {
|
||||
let expiry = "expiry" in cookie ? cookie.expiry : MAX_EXPIRY;
|
||||
let cookieObj = {
|
||||
host: cookie.host,
|
||||
path: cookie.path || "",
|
||||
name: cookie.name || ""
|
||||
};
|
||||
if (!Services.cookies.cookieExists(cookieObj)) {
|
||||
Services.cookies.add(cookie.host, cookie.path || "", cookie.name || "",
|
||||
cookie.value, !!cookie.secure, !!cookie.httponly,
|
||||
/* isSession = */ true, expiry);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@ -241,6 +248,8 @@ var SessionCookiesInternal = {
|
||||
|
||||
if (cookie.isSession) {
|
||||
CookieStore.set(cookie);
|
||||
} else {
|
||||
CookieStore.delete(cookie);
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user