morgan pushed to branch tor-browser-153.0esr-16.0-1 at The Tor Project / Applications / Tor Browser Commits: 72159ca2 by Pier Angelo Vendrame at 2026-08-05T14:10:10+00:00 fixup! TB 27476: Implement about:torconnect captive portal within Tor Browser TB 45192: Fix about:torconnect redirects for HSTS-preloaded URLs. - - - - - 1 changed file: - toolkit/content/aboutNetError.mjs Changes: ===================================== toolkit/content/aboutNetError.mjs ===================================== @@ -1384,28 +1384,29 @@ async function ensureCertErrorCode() { i++; errorCode = await retryCertErrorCode(); } +} - if (!errorCode) { - errorCode = gErrorCode; +async function maybeRedirectToBootstrap() { + if (gErrorCode !== "proxyConnectFailure") { + return; } - if (errorCode === "proxyConnectFailure") { - let inIframe; - try { - inIframe = window.self !== window.top; - } catch { - // Assume a frame if access to top is blocked. - inIframe = true; - } - if (!inIframe && (await RPMSendQuery("ShouldShowTorConnect"))) { - // pass orginal destination as redirect param - const encodedRedirect = encodeURIComponent(document.location.href); - document.location.replace(`about:torconnect?redirect=${encodedRedirect}`); - } + let inIframe; + try { + inIframe = window.self !== window.top; + } catch { + // Assume a frame if access to top is blocked. + inIframe = true; + } + if (!inIframe && (await RPMSendQuery("ShouldShowTorConnect"))) { + // pass orginal destination as redirect param + const encodedRedirect = encodeURIComponent(document.location.href); + document.location.replace(`about:torconnect?redirect=${encodedRedirect}`); } } async function main() { await ensureCertErrorCode(); + await maybeRedirectToBootstrap(); if (!NetErrorCard.isSupported()) { // Initialize the error registry for legacy path initializeRegistry(); View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/72159ca2... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/72159ca2... You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
participants (1)
-
morgan (@morgan)