Skip to content

Commit ff2bc1d

Browse files
committed
Merge pull request EFForg#209 from semenko/fix-cookie-bug
Fix cookie bug
2 parents a9b1a4c + 215d210 commit ff2bc1d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

chromium/background.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,15 +312,15 @@ function onCookieChanged(changeInfo) {
312312
}
313313

314314
// The cookie API is magical -- we must recreate the URL from the domain and path.
315-
if (cookie.domain[0] == ".") {
316-
cookie.url = "https://www" + cookie.domain + cookie.path;
315+
if (changeInfo.cookie.domain[0] == ".") {
316+
cookie.url = "https://www" + changeInfo.cookie.domain + cookie.path;
317317
} else {
318-
cookie.url = "https://" + cookie.domain + cookie.path;
318+
cookie.url = "https://" + changeInfo.cookie.domain + cookie.path;
319319
}
320320
// We get repeated events for some cookies because sites change their
321321
// value repeatedly and remove the "secure" flag.
322322
log(DBUG,
323-
"Securing cookie "+cookie.name+" for "+cookie.domain+", was secure="+changeInfo.cookie.secure);
323+
"Securing cookie " + cookie.name + " for " + changeInfo.cookie.domain + ", was secure=" + changeInfo.cookie.secure);
324324
chrome.cookies.set(cookie);
325325
}
326326
}

0 commit comments

Comments
 (0)