lists.torproject.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

tbb-commits

Thread Start a new thread
Download
Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
tbb-commits@lists.torproject.org

April 2024

  • 1 participants
  • 152 discussions
[Git][tpo/applications/tor-browser][tor-browser-115.9.1esr-13.0-1] fixup! Bug 41369: Improve Firefox language settings for multi-lingual packages
by Pier Angelo Vendrame (@pierov) 08 Apr '24

08 Apr '24
Pier Angelo Vendrame pushed to branch tor-browser-115.9.1esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: c584d988 by Pier Angelo Vendrame at 2024-04-08T17:40:45+02:00 fixup! Bug 41369: Improve Firefox language settings for multi-lingual packages Bug 42335: Do not localize the order of languages - - - - - 1 changed file: - browser/components/preferences/main.js Changes: ===================================== browser/components/preferences/main.js ===================================== @@ -1456,7 +1456,9 @@ var gMainPane = { name, }; }); - locales.sort((a, b) => a.code.localeCompare(b.code)); + // tor-browser#42335: Sort language codes independently from the locale, + // so do not use localeCompare. + locales.sort((a, b) => a.code > b.code); let fragment = document.createDocumentFragment(); for (let { code, name } of locales) { View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/c584d98… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/c584d98… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.9.0esr-13.5-1] fixup! Base Browser's .mozconfigs.
by Pier Angelo Vendrame (@pierov) 08 Apr '24

08 Apr '24
Pier Angelo Vendrame pushed to branch mullvad-browser-115.9.0esr-13.5-1 at The Tor Project / Applications / Mullvad Browser Commits: caf40825 by NoisyCoil at 2024-04-08T16:40:48+02:00 fixup! Base Browser's .mozconfigs. Bug 42501: Move `--disable-eme` to OS- and architecture-specific mozconfigs. - - - - - 9 changed files: - browser/config/mozconfigs/base-browser - mozconfig-linux-i686 - mozconfig-linux-x86_64 - mozconfig-linux-x86_64-asan - mozconfig-linux-x86_64-dev - mozconfig-macos - mozconfig-macos-dev - mozconfig-windows-i686 - mozconfig-windows-x86_64 Changes: ===================================== browser/config/mozconfigs/base-browser ===================================== @@ -24,8 +24,6 @@ ac_add_options --disable-debug ac_add_options --disable-crashreporter ac_add_options --disable-parental-controls -# Let's make sure no preference is enabling either Adobe's or Google's CDM. -ac_add_options --disable-eme ac_add_options --enable-proxy-bypass-protection # See bugs #30575 and #32418: system policies are harmful either because they # could allow proxy bypass, and override a number of other preferences we set ===================================== mozconfig-linux-i686 ===================================== @@ -10,3 +10,7 @@ ac_add_options --disable-strip ac_add_options --disable-install-strip ac_add_options --enable-default-toolkit=cairo-gtk3 + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-linux-x86_64 ===================================== @@ -7,3 +7,7 @@ ac_add_options --disable-strip ac_add_options --disable-install-strip ac_add_options --enable-default-toolkit=cairo-gtk3 + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-linux-x86_64-asan ===================================== @@ -20,3 +20,7 @@ ac_add_options --enable-default-toolkit=cairo-gtk3 ac_add_options --disable-strip ac_add_options --disable-install-strip + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-linux-x86_64-dev ===================================== @@ -17,3 +17,7 @@ ac_add_options --disable-install-strip ac_add_options --with-base-browser-version=dev-build ac_add_options --disable-base-browser-update + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-macos ===================================== @@ -10,3 +10,7 @@ ac_add_options --disable-update-agent # For base-browser we do not enable portable mode on macOS. ac_add_options --without-relative-data-dir + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-macos-dev ===================================== @@ -17,3 +17,6 @@ ac_add_options --enable-nss-mar # See bug #41131 ac_add_options --disable-update-agent +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-windows-i686 ===================================== @@ -19,3 +19,7 @@ ac_add_options --disable-update-agent # Bug 1782837: Not supported because Mozilla (and therefore also us) build # libc++ with LIBCXX_ENABLE_FILESYSTEM disabled. ac_add_options --disable-notification-server + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-windows-x86_64 ===================================== @@ -18,3 +18,7 @@ ac_add_options --disable-update-agent # Bug 1782837: Not supported because Mozilla (and therefore also us) build # libc++ with LIBCXX_ENABLE_FILESYSTEM disabled. ac_add_options --disable-notification-server + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/caf… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/caf… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-115.9.0esr-13.5-1] fixup! Base Browser's .mozconfigs.
by Pier Angelo Vendrame (@pierov) 08 Apr '24

08 Apr '24
Pier Angelo Vendrame pushed to branch base-browser-115.9.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 2c131c74 by NoisyCoil at 2024-04-08T16:34:40+02:00 fixup! Base Browser's .mozconfigs. Bug 42501: Move `--disable-eme` to OS- and architecture-specific mozconfigs. - - - - - 9 changed files: - browser/config/mozconfigs/base-browser - mozconfig-linux-i686 - mozconfig-linux-x86_64 - mozconfig-linux-x86_64-asan - mozconfig-linux-x86_64-dev - mozconfig-macos - mozconfig-macos-dev - mozconfig-windows-i686 - mozconfig-windows-x86_64 Changes: ===================================== browser/config/mozconfigs/base-browser ===================================== @@ -29,8 +29,6 @@ ac_add_options --disable-crashreporter # Before removing, please notice that WebRTC does not work on mingw (Bug 1393901) ac_add_options --disable-webrtc ac_add_options --disable-parental-controls -# Let's make sure no preference is enabling either Adobe's or Google's CDM. -ac_add_options --disable-eme ac_add_options --enable-proxy-bypass-protection # See bugs #30575 and #32418: system policies are harmful either because they # could allow proxy bypass, and override a number of other preferences we set ===================================== mozconfig-linux-i686 ===================================== @@ -10,3 +10,7 @@ ac_add_options --disable-strip ac_add_options --disable-install-strip ac_add_options --enable-default-toolkit=cairo-gtk3 + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-linux-x86_64 ===================================== @@ -7,3 +7,7 @@ ac_add_options --disable-strip ac_add_options --disable-install-strip ac_add_options --enable-default-toolkit=cairo-gtk3 + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-linux-x86_64-asan ===================================== @@ -20,3 +20,7 @@ ac_add_options --enable-default-toolkit=cairo-gtk3 ac_add_options --disable-strip ac_add_options --disable-install-strip + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-linux-x86_64-dev ===================================== @@ -16,3 +16,7 @@ ac_add_options --disable-install-strip ac_add_options --with-base-browser-version=dev-build ac_add_options --disable-base-browser-update + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-macos ===================================== @@ -10,3 +10,7 @@ ac_add_options --disable-update-agent # For base-browser we do not enable portable mode on macOS. ac_add_options --without-relative-data-dir + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-macos-dev ===================================== @@ -17,3 +17,6 @@ ac_add_options --enable-nss-mar # See bug #41131 ac_add_options --disable-update-agent +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-windows-i686 ===================================== @@ -19,3 +19,7 @@ ac_add_options --disable-update-agent # Bug 1782837: Not supported because Mozilla (and therefore also us) build # libc++ with LIBCXX_ENABLE_FILESYSTEM disabled. ac_add_options --disable-notification-server + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-windows-x86_64 ===================================== @@ -19,3 +19,7 @@ ac_add_options --disable-update-agent # Bug 1782837: Not supported because Mozilla (and therefore also us) build # libc++ with LIBCXX_ENABLE_FILESYSTEM disabled. ac_add_options --disable-notification-server + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/2c131c7… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/2c131c7… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-115.9.0esr-13.5-1] fixup! Base Browser's .mozconfigs.
by Pier Angelo Vendrame (@pierov) 08 Apr '24

08 Apr '24
Pier Angelo Vendrame pushed to branch base-browser-115.9.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 91bc2eb9 by NoisyCoil at 2024-04-08T16:28:56+02:00 fixup! Base Browser's .mozconfigs. Bug 42491: Add mozconfig-linux-aarch64. - - - - - 1 changed file: - + mozconfig-linux-aarch64 Changes: ===================================== mozconfig-linux-aarch64 ===================================== @@ -0,0 +1,12 @@ +. $topsrcdir/browser/config/mozconfigs/base-browser + +ac_add_options --target=aarch64-unknown-linux-gnu + +# Moz switched to lld for all Linux targets in Bug 1839739. +ac_add_options --enable-linker=lld + +ac_add_options --disable-strip +ac_add_options --disable-install-strip + +ac_add_options --enable-default-toolkit=cairo-gtk3 + View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/91bc2eb… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/91bc2eb… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.9.0esr-13.5-1] 2 commits: fixup! Base Browser's .mozconfigs.
by Pier Angelo Vendrame (@pierov) 08 Apr '24

08 Apr '24
Pier Angelo Vendrame pushed to branch tor-browser-115.9.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 55a8e45b by NoisyCoil at 2024-04-08T14:22:45+00:00 fixup! Base Browser's .mozconfigs. Bug 42491: Add mozconfig-linux-aarch64. - - - - - 27fee80a by NoisyCoil at 2024-04-08T14:22:45+00:00 fixup! TB3: Tor Browser's official .mozconfigs. - - - - - 1 changed file: - + mozconfig-linux-aarch64 Changes: ===================================== mozconfig-linux-aarch64 ===================================== @@ -0,0 +1,12 @@ +. $topsrcdir/browser/config/mozconfigs/tor-browser + +ac_add_options --target=aarch64-unknown-linux-gnu + +# Moz switched to lld for all Linux targets in Bug 1839739. +ac_add_options --enable-linker=lld + +ac_add_options --disable-strip +ac_add_options --disable-install-strip + +ac_add_options --enable-default-toolkit=cairo-gtk3 + View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/9ed772… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/9ed772… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.9.0esr-13.5-1] fixup! Base Browser's .mozconfigs.
by Pier Angelo Vendrame (@pierov) 08 Apr '24

08 Apr '24
Pier Angelo Vendrame pushed to branch mullvad-browser-115.9.0esr-13.5-1 at The Tor Project / Applications / Mullvad Browser Commits: c3b548a0 by NoisyCoil at 2024-04-08T13:17:33+00:00 fixup! Base Browser's .mozconfigs. Bug 279: Add mozconfig-linux-aarch64. - - - - - 1 changed file: - + mozconfig-linux-aarch64 Changes: ===================================== mozconfig-linux-aarch64 ===================================== @@ -0,0 +1,12 @@ +. $topsrcdir/browser/config/mozconfigs/mullvad-browser + +ac_add_options --target=aarch64-unknown-linux-gnu + +# Moz switched to lld for all Linux targets in Bug 1839739. +ac_add_options --enable-linker=lld + +ac_add_options --disable-strip +ac_add_options --disable-install-strip + +ac_add_options --enable-default-toolkit=cairo-gtk3 + View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/c3b… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/c3b… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.9.0esr-13.5-1] fixup! Base Browser's .mozconfigs.
by Pier Angelo Vendrame (@pierov) 08 Apr '24

08 Apr '24
Pier Angelo Vendrame pushed to branch tor-browser-115.9.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 9ed772d1 by NoisyCoil at 2024-04-08T13:14:13+00:00 fixup! Base Browser's .mozconfigs. Bug 42501: Move `--disable-eme` to OS- and architecture-specific mozconfigs. - - - - - 9 changed files: - browser/config/mozconfigs/base-browser - mozconfig-linux-i686 - mozconfig-linux-x86_64 - mozconfig-linux-x86_64-asan - mozconfig-linux-x86_64-dev - mozconfig-macos - mozconfig-macos-dev - mozconfig-windows-i686 - mozconfig-windows-x86_64 Changes: ===================================== browser/config/mozconfigs/base-browser ===================================== @@ -26,8 +26,6 @@ ac_add_options --disable-crashreporter # Before removing, please notice that WebRTC does not work on mingw (Bug 1393901) ac_add_options --disable-webrtc ac_add_options --disable-parental-controls -# Let's make sure no preference is enabling either Adobe's or Google's CDM. -ac_add_options --disable-eme ac_add_options --enable-proxy-bypass-protection # See bugs #30575 and #32418: system policies are harmful either because they # could allow proxy bypass, and override a number of other preferences we set ===================================== mozconfig-linux-i686 ===================================== @@ -10,3 +10,7 @@ ac_add_options --disable-strip ac_add_options --disable-install-strip ac_add_options --enable-default-toolkit=cairo-gtk3 + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-linux-x86_64 ===================================== @@ -7,3 +7,7 @@ ac_add_options --disable-strip ac_add_options --disable-install-strip ac_add_options --enable-default-toolkit=cairo-gtk3 + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-linux-x86_64-asan ===================================== @@ -20,3 +20,7 @@ ac_add_options --enable-default-toolkit=cairo-gtk3 ac_add_options --disable-strip ac_add_options --disable-install-strip + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-linux-x86_64-dev ===================================== @@ -18,3 +18,7 @@ ac_add_options --disable-install-strip ac_add_options --with-base-browser-version=dev-build ac_add_options --disable-base-browser-update + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-macos ===================================== @@ -9,3 +9,7 @@ ac_add_options --enable-nss-mar ac_add_options --disable-update-agent ac_add_options --with-relative-data-dir=../TorBrowser-Data/Browser + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-macos-dev ===================================== @@ -22,3 +22,7 @@ export MOZ_APP_REMOTINGNAME="Tor Browser Dev" ac_add_options --with-branding=browser/branding/tb-nightly ac_add_options --with-base-browser-version=dev-build ac_add_options --disable-base-browser-update + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-windows-i686 ===================================== @@ -19,3 +19,7 @@ ac_add_options --disable-update-agent # Bug 1782837: Not supported because Mozilla (and therefore also us) build # libc++ with LIBCXX_ENABLE_FILESYSTEM disabled. ac_add_options --disable-notification-server + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + ===================================== mozconfig-windows-x86_64 ===================================== @@ -19,3 +19,7 @@ ac_add_options --disable-update-agent # Bug 1782837: Not supported because Mozilla (and therefore also us) build # libc++ with LIBCXX_ENABLE_FILESYSTEM disabled. ac_add_options --disable-notification-server + +# Let's make sure no preference is enabling either Adobe's or Google's CDM. +ac_add_options --disable-eme + View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/9ed772d… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/9ed772d… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.9.1esr-13.0-1] 2 commits: fixup! Bug 40926: Implemented the New Identity feature
by ma1 (@ma1) 08 Apr '24

08 Apr '24
ma1 pushed to branch mullvad-browser-115.9.1esr-13.0-1 at The Tor Project / Applications / Mullvad Browser Commits: 1d90ed3d by hackademix at 2024-04-08T13:31:55+02:00 fixup! Bug 40926: Implemented the New Identity feature Bug 42236: Let users decide whether to load their home page on new identity. - - - - - 8e7cdd60 by hackademix at 2024-04-08T13:31:56+02:00 fixup! Bug 40926: Implemented the New Identity feature MB 283: Make new identity homepage check brand-agnostic. - - - - - 2 changed files: - browser/components/newidentity/content/newidentity.js - browser/locales/en-US/chrome/browser/newIdentity.properties Changes: ===================================== browser/components/newidentity/content/newidentity.js ===================================== @@ -10,37 +10,28 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityStrings", () => { ); const brandShortName = brandBundle.GetStringFromName("brandShortName"); - let strings = { - new_identity: "New Identity", - new_identity_sentence_case: "New identity", - new_identity_prompt_title: "Reset your identity?", - new_identity_prompt: `${brandShortName} will close all windows and tabs. All website sessions will be lost. \nRestart ${brandShortName} now to reset your identity?`, - new_identity_restart: `Restart ${brandShortName}`, - new_identity_ask_again: "Never ask me again", - new_identity_menu_accesskey: "I", - }; - let bundle = null; + const fallbackBundle = Services.strings.createBundle( + "resource:///chrome/en-US/locale/browser/newIdentity.properties" + ); + const strings = {}; + const brandedStrings = ["new_identity_prompt", "new_identity_restart"]; + for (let { key } of fallbackBundle.getSimpleEnumeration()) { + strings[key] = fallbackBundle.GetStringFromName(key); + } try { - bundle = Services.strings.createBundle( + const bundle = Services.strings.createBundle( "chrome://browser/locale/newIdentity.properties" ); - } catch (e) { - console.warn("Could not load the New Identity strings"); - } - if (bundle) { for (const key of Object.keys(strings)) { try { strings[key] = bundle.GetStringFromName(key); } catch (e) {} } - strings.new_identity_prompt = strings.new_identity_prompt.replaceAll( - "%S", - brandShortName - ); - strings.new_identity_restart = strings.new_identity_restart.replaceAll( - "%S", - brandShortName - ); + } catch (e) { + console.warn("Could not load localized New Identity strings"); + } + for (let key of brandedStrings) { + strings[key] = strings[key].replaceAll("%S", brandShortName); } return strings; }); @@ -437,10 +428,79 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", () => { logger.info("Opening a new window"); return new Promise(resolve => { // Open a new window forcing the about:privatebrowsing page (tor-browser#41765) - const win = OpenBrowserWindow({private: "no-home"}); + // unless user explicitly overrides this policy (tor-browser #42236) + const homePref = "browser.startup.homepage"; + const trustedHomePref = "browser.startup.homepage.new_identity"; + const homeURL = Services.prefs.getStringPref(homePref, ""); + const defaultHomeURL = Services.prefs + .getDefaultBranch("") + .getStringPref(homePref, ""); + const isTrustedHome = + homeURL === defaultHomeURL || + homeURL.startsWith("chrome://") || // about:blank and other built-ins + homeURL === Services.prefs.getStringPref(trustedHomePref, ""); + const isCustomHome = + Services.prefs.getIntPref("browser.startup.page") === 1; + const win = OpenBrowserWindow({ + private: isCustomHome && isTrustedHome ? "private" : "no-home", + }); // This mechanism to know when the new window is ready is used by // OpenBrowserWindow itself (see its definition in browser.js). - win.addEventListener("MozAfterPaint", () => resolve(), { once: true }); + win.addEventListener( + "MozAfterPaint", + () => { + resolve(); + if (isTrustedHome || !isCustomHome) { + return; + } + const tbl = win.TabsProgressListener; + const { onLocationChange } = tbl; + tbl.onLocationChange = (...args) => { + tbl.onLocationChange = onLocationChange; + tbl.onLocationChange(...args); + let displayAddress; + try { + const url = new URL(homeURL); + displayAddress = url.hostname; + if (!displayAddress) { + // no host, use full address and truncate if too long + const MAX_LEN = 32; + displayAddress = url.href; + if (displayAddress.length > MAX_LEN) { + displayAddress = `${displayAddress.substring(0, MAX_LEN)}…`; + } + } + } catch (e) { + // malformed URL, bail out + return; + } + const label = + NewIdentityStrings.new_identity_home_notification.replace( + "%S", + displayAddress + ); + const callback = () => { + Services.prefs.setStringPref(trustedHomePref, homeURL); + win.BrowserHome(); + }; + const notificationBox = win.gBrowser.getNotificationBox(); + notificationBox.appendNotification( + "new-identity-safe-home", + { + label, + priority: notificationBox.PRIORITY_INFO_MEDIUM, + }, + [ + { + label: NewIdentityStrings.new_identity_home_load_button, + callback, + }, + ] + ); + }; + }, + { once: true } + ); }); } ===================================== browser/locales/en-US/chrome/browser/newIdentity.properties ===================================== @@ -8,3 +8,6 @@ new_identity_restart = Restart %S new_identity_ask_again = Never ask me again # Shown in the File menu (use Alt to show File, if you do not see) new_identity_menu_accesskey = I +new_identity_home_notification = Tor Browser blocked your homepage (%S) from loading because it might recognize your previous session. +# %S is replaced with the custom homepage URL's domain if applicable, or some short-hand of it otherwise +new_identity_home_load_button = Load it anyway View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/1e… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/1e… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-115.9.1esr-13.0-1] 2 commits: fixup! Bug 40926: Implemented the New Identity feature
by ma1 (@ma1) 08 Apr '24

08 Apr '24
ma1 pushed to branch base-browser-115.9.1esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: af4fa50b by hackademix at 2024-04-08T13:30:21+02:00 fixup! Bug 40926: Implemented the New Identity feature Bug 42236: Let users decide whether to load their home page on new identity. - - - - - 772b3eef by hackademix at 2024-04-08T13:30:23+02:00 fixup! Bug 40926: Implemented the New Identity feature MB 283: Make new identity homepage check brand-agnostic. - - - - - 2 changed files: - browser/components/newidentity/content/newidentity.js - browser/locales/en-US/chrome/browser/newIdentity.properties Changes: ===================================== browser/components/newidentity/content/newidentity.js ===================================== @@ -10,37 +10,28 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityStrings", () => { ); const brandShortName = brandBundle.GetStringFromName("brandShortName"); - let strings = { - new_identity: "New Identity", - new_identity_sentence_case: "New identity", - new_identity_prompt_title: "Reset your identity?", - new_identity_prompt: `${brandShortName} will close all windows and tabs. All website sessions will be lost. \nRestart ${brandShortName} now to reset your identity?`, - new_identity_restart: `Restart ${brandShortName}`, - new_identity_ask_again: "Never ask me again", - new_identity_menu_accesskey: "I", - }; - let bundle = null; + const fallbackBundle = Services.strings.createBundle( + "resource:///chrome/en-US/locale/browser/newIdentity.properties" + ); + const strings = {}; + const brandedStrings = ["new_identity_prompt", "new_identity_restart"]; + for (let { key } of fallbackBundle.getSimpleEnumeration()) { + strings[key] = fallbackBundle.GetStringFromName(key); + } try { - bundle = Services.strings.createBundle( + const bundle = Services.strings.createBundle( "chrome://browser/locale/newIdentity.properties" ); - } catch (e) { - console.warn("Could not load the New Identity strings"); - } - if (bundle) { for (const key of Object.keys(strings)) { try { strings[key] = bundle.GetStringFromName(key); } catch (e) {} } - strings.new_identity_prompt = strings.new_identity_prompt.replaceAll( - "%S", - brandShortName - ); - strings.new_identity_restart = strings.new_identity_restart.replaceAll( - "%S", - brandShortName - ); + } catch (e) { + console.warn("Could not load localized New Identity strings"); + } + for (let key of brandedStrings) { + strings[key] = strings[key].replaceAll("%S", brandShortName); } return strings; }); @@ -437,10 +428,79 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", () => { logger.info("Opening a new window"); return new Promise(resolve => { // Open a new window forcing the about:privatebrowsing page (tor-browser#41765) - const win = OpenBrowserWindow({private: "no-home"}); + // unless user explicitly overrides this policy (tor-browser #42236) + const homePref = "browser.startup.homepage"; + const trustedHomePref = "browser.startup.homepage.new_identity"; + const homeURL = Services.prefs.getStringPref(homePref, ""); + const defaultHomeURL = Services.prefs + .getDefaultBranch("") + .getStringPref(homePref, ""); + const isTrustedHome = + homeURL === defaultHomeURL || + homeURL.startsWith("chrome://") || // about:blank and other built-ins + homeURL === Services.prefs.getStringPref(trustedHomePref, ""); + const isCustomHome = + Services.prefs.getIntPref("browser.startup.page") === 1; + const win = OpenBrowserWindow({ + private: isCustomHome && isTrustedHome ? "private" : "no-home", + }); // This mechanism to know when the new window is ready is used by // OpenBrowserWindow itself (see its definition in browser.js). - win.addEventListener("MozAfterPaint", () => resolve(), { once: true }); + win.addEventListener( + "MozAfterPaint", + () => { + resolve(); + if (isTrustedHome || !isCustomHome) { + return; + } + const tbl = win.TabsProgressListener; + const { onLocationChange } = tbl; + tbl.onLocationChange = (...args) => { + tbl.onLocationChange = onLocationChange; + tbl.onLocationChange(...args); + let displayAddress; + try { + const url = new URL(homeURL); + displayAddress = url.hostname; + if (!displayAddress) { + // no host, use full address and truncate if too long + const MAX_LEN = 32; + displayAddress = url.href; + if (displayAddress.length > MAX_LEN) { + displayAddress = `${displayAddress.substring(0, MAX_LEN)}…`; + } + } + } catch (e) { + // malformed URL, bail out + return; + } + const label = + NewIdentityStrings.new_identity_home_notification.replace( + "%S", + displayAddress + ); + const callback = () => { + Services.prefs.setStringPref(trustedHomePref, homeURL); + win.BrowserHome(); + }; + const notificationBox = win.gBrowser.getNotificationBox(); + notificationBox.appendNotification( + "new-identity-safe-home", + { + label, + priority: notificationBox.PRIORITY_INFO_MEDIUM, + }, + [ + { + label: NewIdentityStrings.new_identity_home_load_button, + callback, + }, + ] + ); + }; + }, + { once: true } + ); }); } ===================================== browser/locales/en-US/chrome/browser/newIdentity.properties ===================================== @@ -8,3 +8,6 @@ new_identity_restart = Restart %S new_identity_ask_again = Never ask me again # Shown in the File menu (use Alt to show File, if you do not see) new_identity_menu_accesskey = I +new_identity_home_notification = Tor Browser blocked your homepage (%S) from loading because it might recognize your previous session. +# %S is replaced with the custom homepage URL's domain if applicable, or some short-hand of it otherwise +new_identity_home_load_button = Load it anyway View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/a975b0… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/a975b0… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.9.1esr-13.0-1] 2 commits: fixup! Bug 40926: Implemented the New Identity feature
by ma1 (@ma1) 08 Apr '24

08 Apr '24
ma1 pushed to branch tor-browser-115.9.1esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: db383978 by hackademix at 2024-04-08T13:29:33+02:00 fixup! Bug 40926: Implemented the New Identity feature Bug 42236: Let users decide whether to load their home page on new identity. - - - - - ed19d5f4 by hackademix at 2024-04-08T13:29:35+02:00 fixup! Bug 40926: Implemented the New Identity feature MB 283: Make new identity homepage check brand-agnostic. - - - - - 2 changed files: - browser/components/newidentity/content/newidentity.js - browser/locales/en-US/chrome/browser/newIdentity.properties Changes: ===================================== browser/components/newidentity/content/newidentity.js ===================================== @@ -10,37 +10,28 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityStrings", () => { ); const brandShortName = brandBundle.GetStringFromName("brandShortName"); - let strings = { - new_identity: "New Identity", - new_identity_sentence_case: "New identity", - new_identity_prompt_title: "Reset your identity?", - new_identity_prompt: `${brandShortName} will close all windows and tabs. All website sessions will be lost. \nRestart ${brandShortName} now to reset your identity?`, - new_identity_restart: `Restart ${brandShortName}`, - new_identity_ask_again: "Never ask me again", - new_identity_menu_accesskey: "I", - }; - let bundle = null; + const fallbackBundle = Services.strings.createBundle( + "resource:///chrome/en-US/locale/browser/newIdentity.properties" + ); + const strings = {}; + const brandedStrings = ["new_identity_prompt", "new_identity_restart"]; + for (let { key } of fallbackBundle.getSimpleEnumeration()) { + strings[key] = fallbackBundle.GetStringFromName(key); + } try { - bundle = Services.strings.createBundle( + const bundle = Services.strings.createBundle( "chrome://browser/locale/newIdentity.properties" ); - } catch (e) { - console.warn("Could not load the New Identity strings"); - } - if (bundle) { for (const key of Object.keys(strings)) { try { strings[key] = bundle.GetStringFromName(key); } catch (e) {} } - strings.new_identity_prompt = strings.new_identity_prompt.replaceAll( - "%S", - brandShortName - ); - strings.new_identity_restart = strings.new_identity_restart.replaceAll( - "%S", - brandShortName - ); + } catch (e) { + console.warn("Could not load localized New Identity strings"); + } + for (let key of brandedStrings) { + strings[key] = strings[key].replaceAll("%S", brandShortName); } return strings; }); @@ -437,10 +428,79 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", () => { logger.info("Opening a new window"); return new Promise(resolve => { // Open a new window forcing the about:privatebrowsing page (tor-browser#41765) - const win = OpenBrowserWindow({private: "no-home"}); + // unless user explicitly overrides this policy (tor-browser #42236) + const homePref = "browser.startup.homepage"; + const trustedHomePref = "browser.startup.homepage.new_identity"; + const homeURL = Services.prefs.getStringPref(homePref, ""); + const defaultHomeURL = Services.prefs + .getDefaultBranch("") + .getStringPref(homePref, ""); + const isTrustedHome = + homeURL === defaultHomeURL || + homeURL.startsWith("chrome://") || // about:blank and other built-ins + homeURL === Services.prefs.getStringPref(trustedHomePref, ""); + const isCustomHome = + Services.prefs.getIntPref("browser.startup.page") === 1; + const win = OpenBrowserWindow({ + private: isCustomHome && isTrustedHome ? "private" : "no-home", + }); // This mechanism to know when the new window is ready is used by // OpenBrowserWindow itself (see its definition in browser.js). - win.addEventListener("MozAfterPaint", () => resolve(), { once: true }); + win.addEventListener( + "MozAfterPaint", + () => { + resolve(); + if (isTrustedHome || !isCustomHome) { + return; + } + const tbl = win.TabsProgressListener; + const { onLocationChange } = tbl; + tbl.onLocationChange = (...args) => { + tbl.onLocationChange = onLocationChange; + tbl.onLocationChange(...args); + let displayAddress; + try { + const url = new URL(homeURL); + displayAddress = url.hostname; + if (!displayAddress) { + // no host, use full address and truncate if too long + const MAX_LEN = 32; + displayAddress = url.href; + if (displayAddress.length > MAX_LEN) { + displayAddress = `${displayAddress.substring(0, MAX_LEN)}…`; + } + } + } catch (e) { + // malformed URL, bail out + return; + } + const label = + NewIdentityStrings.new_identity_home_notification.replace( + "%S", + displayAddress + ); + const callback = () => { + Services.prefs.setStringPref(trustedHomePref, homeURL); + win.BrowserHome(); + }; + const notificationBox = win.gBrowser.getNotificationBox(); + notificationBox.appendNotification( + "new-identity-safe-home", + { + label, + priority: notificationBox.PRIORITY_INFO_MEDIUM, + }, + [ + { + label: NewIdentityStrings.new_identity_home_load_button, + callback, + }, + ] + ); + }; + }, + { once: true } + ); }); } ===================================== browser/locales/en-US/chrome/browser/newIdentity.properties ===================================== @@ -8,3 +8,6 @@ new_identity_restart = Restart %S new_identity_ask_again = Never ask me again # Shown in the File menu (use Alt to show File, if you do not see) new_identity_menu_accesskey = I +new_identity_home_notification = Tor Browser blocked your homepage (%S) from loading because it might recognize your previous session. +# %S is replaced with the custom homepage URL's domain if applicable, or some short-hand of it otherwise +new_identity_home_load_button = Load it anyway View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/4b70c6… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/4b70c6… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.