Commit cfa9229f authored by Arthur Edelstein's avatar Arthur Edelstein Committed by Georg Koppen
Browse files

Bug 21747: 'New Tor Circuit for this Site' in ESR52

Also, make sure we renew catchall "--unknown--" domain if user chooses
"New Tor Circuit" for about:addons, for example.
parent 1324e306
......@@ -1014,11 +1014,8 @@ function torbutton_send_ctrl_cmd(command) {
// Bug 1506 P4: Needed for New IP Address
function torbutton_new_circuit() {
let thirdPartyUtil = Cc["@mozilla.org/thirdpartyutil;1"]
.getService(Ci.mozIThirdPartyUtil);
let firstPartyDomain = thirdPartyUtil
.getFirstPartyHostForIsolation(gBrowser.currentURI);
let firstPartyDomain = gBrowser.contentPrincipal.originAttributes
.firstPartyDomain;
let domainIsolator = Cc["@torproject.org/domain-isolator;1"]
.getService(Ci.nsISupports).wrappedJSObject;
......
......@@ -101,6 +101,9 @@ tor.nonce = function() {
tor.newCircuitForDomain = function(domain) {
// Re-generate the nonce for the domain.
if (domain === "") {
domain = "--unknown--";
}
tor.noncesForDomains[domain] = tor.nonce();
logger.eclog(3, "New domain isolation for " + domain + ": " + tor.noncesForDomains[domain]);
};
......
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