summaryrefslogtreecommitdiffstats
path: root/devtools/server/actors/storage.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/server/actors/storage.js')
-rw-r--r--devtools/server/actors/storage.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/devtools/server/actors/storage.js b/devtools/server/actors/storage.js
index a7215b152..c702e8145 100644
--- a/devtools/server/actors/storage.js
+++ b/devtools/server/actors/storage.js
@@ -494,7 +494,7 @@ StorageActors.createActor({
return host == null;
}
- host = trimHttpHttps(host);
+ host = trimHttpHttpsPort(host);
if (cookie.host.startsWith(".")) {
return ("." + host).endsWith(cookie.host);
@@ -761,7 +761,7 @@ var cookieHelpers = {
host = "";
}
- host = trimHttpHttps(host);
+ host = trimHttpHttpsPort(host);
let cookies = Services.cookies.getCookiesFromHost(host, originAttributes);
let store = [];
@@ -897,7 +897,7 @@ var cookieHelpers = {
opts.path = split[2];
}
- host = trimHttpHttps(host);
+ host = trimHttpHttpsPort(host);
function hostMatches(cookieHost, matchHost) {
if (cookieHost == null) {
@@ -2452,7 +2452,12 @@ exports.setupParentProcessForIndexedDB = function ({ mm, prefix }) {
/**
* General helpers
*/
-function trimHttpHttps(url) {
+function trimHttpHttpsPort(url) {
+ let match = url.match(/(.+):\d+$/);
+
+ if (match) {
+ url = match[1];
+ }
if (url.startsWith("http://")) {
return url.substr(7);
}