tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit da9fc176ae56f1a079e297a4de2e5fc16252f8ec
parent 4c7312620865aee9739abccef2c90f8dab6d8cd6
Author: Randell Jesup <rjesup@mozilla.com>
Date:   Tue,  7 Oct 2025 14:07:11 +0000

Bug 1984198: Fix for ipv6 clear by principal for Compression Dictionaries r=edgul

Differential Revision: https://phabricator.services.mozilla.com/D266206

Diffstat:
Mtoolkit/components/cleardata/ClearDataService.sys.mjs | 13++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/toolkit/components/cleardata/ClearDataService.sys.mjs b/toolkit/components/cleardata/ClearDataService.sys.mjs @@ -208,13 +208,20 @@ const CookieCleaner = { deleteByHost(aHost, aOriginAttributes) { return new Promise(aResolve => { - // Compression dictionaries are https only - let httpsURI = Services.io.newURI("https://" + aHost); - Services.cache2.clearOriginDictionary(httpsURI); Services.cookies.removeCookiesFromExactHost( aHost, JSON.stringify(aOriginAttributes) ); + // Compression dictionaries are https only + // Note that IPV6 urls require [...], but aPrincipal.host (passed + // to this) doesn't include the []. + if (aHost.includes(":") && aHost[0] != "[") { + aHost = "https://[" + aHost + "]"; + } else { + aHost = "https://" + aHost; + } + let httpsURI = Services.io.newURI(aHost); + Services.cache2.clearOriginDictionary(httpsURI); aResolve(); }); },