Commit 42b2886e authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃
Browse files

fixup! TB 27476: Implement about:torconnect captive portal within Tor Browser

TB 45192: Fix about:torconnect redirects for HSTS-preloaded URLs.
parent 192762bf
Loading
Loading
Loading
Loading
+16 −15
Original line number Diff line number Diff line
@@ -1294,11 +1294,12 @@ 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;
@@ -1312,7 +1313,6 @@ async function ensureCertErrorCode() {
    document.location.replace(`about:torconnect?redirect=${encodedRedirect}`);
  }
}
}

function maybeShowSSLKeyLoggingWarning() {
  if (!RPMIsSSLKeyLoggingEnabled()) {
@@ -1326,6 +1326,7 @@ function maybeShowSSLKeyLoggingWarning() {

async function main() {
  await ensureCertErrorCode();
  await maybeRedirectToBootstrap();
  if (!NetErrorCard.isSupported()) {
    // Initialize the error registry for legacy path
    initializeRegistry();