From 96cee35462cf4b13fe2735d8c5bd1f009abda23d Mon Sep 17 00:00:00 2001 From: Valentin Gosu Date: Thu, 23 Feb 2023 14:01:19 +0000 Subject: [PATCH] Bug 1812028 - Do not show the website's name in the DoH error UI title (fallback page) r=acreskey,fluent-reviewers,flod Differential Revision: https://phabricator.services.mozilla.com/D170669 --- .../about/browser_aboutNetError_native_fallback.js | 4 ++-- toolkit/content/aboutNetError.mjs | 12 ++++-------- toolkit/locales/en-US/toolkit/neterror/certError.ftl | 8 ++------ 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/browser/base/content/test/about/browser_aboutNetError_native_fallback.js b/browser/base/content/test/about/browser_aboutNetError_native_fallback.js index 044286d93b6e..818e068e41ed 100644 --- a/browser/base/content/test/about/browser_aboutNetError_native_fallback.js +++ b/browser/base/content/test/about/browser_aboutNetError_native_fallback.js @@ -68,12 +68,12 @@ async function verifyError(url, fallbackWarning, testName) { if (args.fallbackWarning) { is( actualDataL10nID, - "dns-not-found-native-fallback-title", + "dns-not-found-native-fallback-title2", "Correct fallback warning error page title is set: " + args.testName ); } else { ok( - actualDataL10nID != "dns-not-found-native-fallback-title", + actualDataL10nID != "dns-not-found-native-fallback-title2", "Should not show fallback warning: " + args.testName ); } diff --git a/toolkit/content/aboutNetError.mjs b/toolkit/content/aboutNetError.mjs index 45791e485b38..ac0d6ff807ec 100644 --- a/toolkit/content/aboutNetError.mjs +++ b/toolkit/content/aboutNetError.mjs @@ -505,15 +505,11 @@ function showNativeFallbackWarning() { let bodyTitleId = gErrorCode + "-title"; document.body.className = "certerror"; // Shows warning icon - pageTitleId = "dns-not-found-native-fallback-title"; - document.l10n.setAttributes(docTitle, pageTitleId, { - hostname: HOST_NAME, - }); + pageTitleId = "dns-not-found-native-fallback-title2"; + document.l10n.setAttributes(docTitle, pageTitleId); - bodyTitleId = "dns-not-found-native-fallback-title"; - document.l10n.setAttributes(bodyTitle, bodyTitleId, { - hostname: HOST_NAME, - }); + bodyTitleId = "dns-not-found-native-fallback-title2"; + document.l10n.setAttributes(bodyTitle, bodyTitleId); shortDesc.textContent = ""; let nativeFallbackIgnoreButton = document.getElementById( diff --git a/toolkit/locales/en-US/toolkit/neterror/certError.ftl b/toolkit/locales/en-US/toolkit/neterror/certError.ftl index c34579da2c16..58e3c56a8afb 100644 --- a/toolkit/locales/en-US/toolkit/neterror/certError.ftl +++ b/toolkit/locales/en-US/toolkit/neterror/certError.ftl @@ -106,14 +106,10 @@ deniedPortAccess-title = This address is restricted # You don't have to include it in your translation if your language does not have a written word like this. dnsNotFound-title = Hmm. We’re having trouble finding that site. -# Variables: dns-not-found-trr-only-title2 = Possible security risk looking up this domain - -# Variables: -# $hostname (string) - Hostname of the website to which the user was trying to connect. -dns-not-found-native-fallback-title = - Possible security risk for { $hostname }. +dns-not-found-native-fallback-title2 = + Possible security risk looking up this domain fileNotFound-title = File not found fileAccessDenied-title = Access to the file was denied