summaryrefslogtreecommitdiffstats
path: root/application/palemoon
diff options
context:
space:
mode:
authorNew Tobin Paradigm <email@mattatobin.com>2018-04-24 11:03:07 -0400
committerGitHub <noreply@github.com>2018-04-24 11:03:07 -0400
commitc80777a81cddee2e8cacf2a21242630bce9fa7d9 (patch)
treed47cf7037debff4037f77da2004e50f085421a94 /application/palemoon
parentbb87aeab9a404af4313eb7a707d8911eb418b8b0 (diff)
parent2f5ced80c48cba4c41261c92092188b68e39218a (diff)
downloadUXP-c80777a81cddee2e8cacf2a21242630bce9fa7d9.tar
UXP-c80777a81cddee2e8cacf2a21242630bce9fa7d9.tar.gz
UXP-c80777a81cddee2e8cacf2a21242630bce9fa7d9.tar.lz
UXP-c80777a81cddee2e8cacf2a21242630bce9fa7d9.tar.xz
UXP-c80777a81cddee2e8cacf2a21242630bce9fa7d9.zip
Merge pull request #255 from janekptacijarabaci/pm_preferences_cookies_1
[PALEMOON] [frontend vs backend] Fix cookies in Preferences
Diffstat (limited to 'application/palemoon')
-rw-r--r--application/palemoon/components/preferences/cookies.js38
1 files changed, 23 insertions, 15 deletions
diff --git a/application/palemoon/components/preferences/cookies.js b/application/palemoon/components/preferences/cookies.js
index c0455d679..ea7e7d4e2 100644
--- a/application/palemoon/components/preferences/cookies.js
+++ b/application/palemoon/components/preferences/cookies.js
@@ -63,7 +63,9 @@ var gCookiesWindow = {
_cookieEquals: function (aCookieA, aCookieB, aStrippedHost) {
return aCookieA.rawHost == aStrippedHost &&
aCookieA.name == aCookieB.name &&
- aCookieA.path == aCookieB.path;
+ aCookieA.path == aCookieB.path &&
+ ChromeUtils.isOriginAttributesEqual(aCookieA.originAttributes,
+ aCookieB.originAttributes);
},
observe: function (aCookie, aTopic, aData) {
@@ -268,15 +270,19 @@ var gCookiesWindow = {
var item = this._getItemAtIndex(aIndex);
if (!item) return;
this._invalidateCache(aIndex - 1);
- if (item.container)
+ if (item.container) {
gCookiesWindow._hosts[item.rawHost] = null;
- else {
+ } else {
var parent = this._getItemAtIndex(item.parentIndex);
for (var i = 0; i < parent.cookies.length; ++i) {
var cookie = parent.cookies[i];
if (item.rawHost == cookie.rawHost &&
- item.name == cookie.name && item.path == cookie.path)
+ item.name == cookie.name &&
+ item.path == cookie.path &&
+ ChromeUtils.isOriginAttributesEqual(item.originAttributes,
+ cookie.originAttributes)) {
parent.cookies.splice(i, removeCount);
+ }
}
}
},
@@ -451,16 +457,17 @@ var gCookiesWindow = {
_makeCookieObject: function (aStrippedHost, aCookie) {
var host = aCookie.host;
var formattedHost = host.charAt(0) == "." ? host.substring(1, host.length) : host;
- var c = { name : aCookie.name,
- value : aCookie.value,
- isDomain : aCookie.isDomain,
- host : aCookie.host,
- rawHost : aStrippedHost,
- path : aCookie.path,
- isSecure : aCookie.isSecure,
- expires : aCookie.expires,
- level : 1,
- container : false };
+ var c = { name : aCookie.name,
+ value : aCookie.value,
+ isDomain : aCookie.isDomain,
+ host : aCookie.host,
+ rawHost : aStrippedHost,
+ path : aCookie.path,
+ isSecure : aCookie.isSecure,
+ expires : aCookie.expires,
+ level : 1,
+ container : false,
+ originAttributes: aCookie.originAttributes };
return c;
},
@@ -567,7 +574,8 @@ var gCookiesWindow = {
blockFutureCookies = psvc.getBoolPref("network.cookie.blockFutureCookies");
for (var i = 0; i < deleteItems.length; ++i) {
var item = deleteItems[i];
- this._cm.remove(item.host, item.name, item.path, blockFutureCookies);
+ this._cm.remove(item.host, item.name, item.path,
+ blockFutureCookies, item.originAttributes);
}
},