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 -----
  • June
  • 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

September 2024

  • 1 participants
  • 250 discussions
[Git][tpo/applications/tor-browser][tor-browser-128.2.0esr-14.0-1] 2 commits: fixup! Bug 40009: [android] Change the default search engines
by Pier Angelo Vendrame (@pierov) 12 Sep '24

12 Sep '24
Pier Angelo Vendrame pushed to branch tor-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Tor Browser Commits: f52fcb50 by cypherpunks1 at 2024-09-12T19:06:14+00:00 fixup! Bug 40009: [android] Change the default search engines Bug 43128: Make the ddg-onion search plugin consistent with ddg - - - - - cf07aee1 by cypherpunks1 at 2024-09-12T19:06:14+00:00 fixup! Bug 40925: Implemented the Security Level component Bug 43128: Use DuckDuckGo HTML on the Safest security level for Android - - - - - 5 changed files: - mobile/android/android-components/components/feature/search/src/main/assets/searchplugins/ddg-onion.xml - mobile/android/android-components/components/feature/search/src/main/java/mozilla/components/feature/search/SearchUseCases.kt - mobile/android/android-components/components/feature/search/src/main/java/mozilla/components/feature/search/ext/SearchEngine.kt - mobile/android/android-components/components/feature/search/src/main/java/mozilla/components/feature/search/internal/SearchUrlBuilder.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/UseCases.kt Changes: ===================================== mobile/android/android-components/components/feature/search/src/main/assets/searchplugins/ddg-onion.xml ===================================== @@ -3,9 +3,8 @@ <Description>Duck Duck Go Onion</Description> <InputEncoding>UTF-8</InputEncoding> <Image height="16" width="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAB8lBMVEUAAADkRQzjPwPjQQXkRQ3iPwTiQQXgPQPeQgrcOwPVNgDVNQDWOgbTMwDRMgDQMwDSMwDRNwTQLgDRJgDSJwDSLgDSNwTjOgDiOADjOQDkPADhQAXzs5v+/fv////0vKbiRQvgPQHpdUr85NzuknPdKgDcIwDnZzj2w7HqeU/gPQLsimb/+PftjWn97Obpb0LdJQDeLQDtjmvsi2jgSBDnbULgOQD/39HgLQDeMgDpeFLgSBH0v670uqbaJQD2qImWvP/G1Ob5+/3u//+fvvXyp47dMwDaLwD0u6v0v6/aNQDiXi/aKQD3qozU7/8gSY2vvtg0ZK/OqLDaKQHYKgLgWTfaNADZMgDZMADZLADzqpD7//+xwdz//9H/5Bn/7Bn//ADofADYMADYMQDZOgPXLgDiZDj//97/0AD3tQDvlgHZOgbXLATXMADWMgDfXjLVLQD///z+0AD/3Rn/yRnwnQDcVjbVMQDyv67wuKTSJwDRHQD+8O/tg3/iQQDwhAHnawHWMADvtKfyva7XQxHga0bQGQD2vbH/u8LXIQCmPQzja07XQxLliGn99fPkcVHvhnGZ5VguvUU5wktBwCcAgxzydVv/8/XmiGngdlL+ysi3+I8LtCE80V6P3YmX4sDleljSNQLzr6D7sKPXNQTSIwAEAbMrAAAAF3RSTlMARqSkRvPz80PTpKRG3fPe3hio9/eoGP50jNsAAAABYktHRB5yCiArAAAAyElEQVQYGQXBvUqCYRiA4fu2V9Tn+UQddI3aCpxaOoU6iU4gcqqpoYbALXBuCuoYmttamqJDiEoh4YP+MOi6BNCh+uYKEGiOVNCXXxA2XDVV/UyfKbRCXTLQWAxbP2vt8Ue/uYDvfim91615sb2um6rqtrr/NFb1cUf1Ybd06areU6lSlYpK79jzK1SyJOkfhOl8JGEcqV5zoKrTRqO6yUzIzNu46ijdM1VV9bhuUJ/nZURExLRzUiPQm3kKXHi4BAEGOmOi78A/L1QoU/VHoTsAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTQtMDEtMTlUMjA6MDE6MTEtMDU6MDAuET6cAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE0LTAxLTE5VDIwOjAxOjExLTA1OjAwX0yGIAAAAABJRU5ErkJggg==</Image> -<Url type="text/html" method="POST" template="https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion"> +<Url type="text/html" method="GET" template="https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/"> <Param name="q" value="{searchTerms}"/> </Url> <SearchForm>https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion</SearchForm> </SearchPlugin> - ===================================== mobile/android/android-components/components/feature/search/src/main/java/mozilla/components/feature/search/SearchUseCases.kt ===================================== @@ -13,6 +13,8 @@ import mozilla.components.browser.state.state.SessionState import mozilla.components.browser.state.state.selectedOrDefaultSearchEngine import mozilla.components.browser.state.store.BrowserStore import mozilla.components.concept.engine.EngineSession +import mozilla.components.concept.engine.Settings +import mozilla.components.concept.engine.UnsupportedSettingException import mozilla.components.feature.search.ext.buildSearchUrl import mozilla.components.feature.session.SessionUseCases import mozilla.components.feature.tabs.TabsUseCases @@ -25,6 +27,7 @@ class SearchUseCases( store: BrowserStore, tabsUseCases: TabsUseCases, sessionUseCases: SessionUseCases, + settings: Settings? = null, ) { interface SearchUseCase { /** @@ -41,6 +44,7 @@ class SearchUseCases( private val store: BrowserStore, private val tabsUseCases: TabsUseCases, private val sessionUseCases: SessionUseCases, + private val settings: Settings? = null, ) : SearchUseCase { private val logger = Logger("DefaultSearchUseCase") @@ -72,9 +76,15 @@ class SearchUseCases( flags: EngineSession.LoadUrlFlags = EngineSession.LoadUrlFlags.none(), additionalHeaders: Map<String, String>? = null, ) { + var securityLevel: Int + try { + securityLevel = settings?.torSecurityLevel ?: 0 + } catch (e: UnsupportedSettingException) { + securityLevel = 0 + } val searchUrl = searchEngine?.let { - searchEngine.buildSearchUrl(searchTerms) - } ?: store.state.search.selectedOrDefaultSearchEngine?.buildSearchUrl(searchTerms) + searchEngine.buildSearchUrl(searchTerms, securityLevel) + } ?: store.state.search.selectedOrDefaultSearchEngine?.buildSearchUrl(searchTerms, securityLevel) if (searchUrl == null) { logger.warn("No default search engine available to perform search") @@ -124,6 +134,7 @@ class SearchUseCases( private val store: BrowserStore, private val tabsUseCases: TabsUseCases, private val isPrivate: Boolean, + private val settings: Settings? = null, ) : SearchUseCase { private val logger = Logger("NewTabSearchUseCase") @@ -161,9 +172,15 @@ class SearchUseCases( flags: EngineSession.LoadUrlFlags = EngineSession.LoadUrlFlags.none(), additionalHeaders: Map<String, String>? = null, ) { + var securityLevel: Int + try { + securityLevel = settings?.torSecurityLevel ?: 0 + } catch (e: UnsupportedSettingException) { + securityLevel = 0 + } val searchUrl = searchEngine?.let { - searchEngine.buildSearchUrl(searchTerms) - } ?: store.state.search.selectedOrDefaultSearchEngine?.buildSearchUrl(searchTerms) + searchEngine.buildSearchUrl(searchTerms, securityLevel) + } ?: store.state.search.selectedOrDefaultSearchEngine?.buildSearchUrl(searchTerms, securityLevel) if (searchUrl == null) { logger.warn("No default search engine available to perform search") @@ -310,15 +327,15 @@ class SearchUseCases( } val defaultSearch: DefaultSearchUseCase by lazy { - DefaultSearchUseCase(store, tabsUseCases, sessionUseCases) + DefaultSearchUseCase(store, tabsUseCases, sessionUseCases, settings) } val newTabSearch: NewTabSearchUseCase by lazy { - NewTabSearchUseCase(store, tabsUseCases, false) + NewTabSearchUseCase(store, tabsUseCases, false, settings) } val newPrivateTabSearch: NewTabSearchUseCase by lazy { - NewTabSearchUseCase(store, tabsUseCases, true) + NewTabSearchUseCase(store, tabsUseCases, true, settings) } val addSearchEngine: AddNewSearchEngineUseCase by lazy { ===================================== mobile/android/android-components/components/feature/search/src/main/java/mozilla/components/feature/search/ext/SearchEngine.kt ===================================== @@ -85,9 +85,9 @@ fun SearchEngine.buildSuggestionsURL(query: String): String? { /** * Builds a URL to search for the given search terms with this search engine. */ -fun SearchEngine.buildSearchUrl(searchTerm: String): String { +fun SearchEngine.buildSearchUrl(searchTerm: String, securityLevel: Int = 0): String { val builder = SearchUrlBuilder(this) - return builder.buildSearchUrl(searchTerm) + return builder.buildSearchUrl(searchTerm, securityLevel) } /** ===================================== mobile/android/android-components/components/feature/search/src/main/java/mozilla/components/feature/search/internal/SearchUrlBuilder.kt ===================================== @@ -28,9 +28,12 @@ private const val OS_PARAM_OPTIONAL = "\\{" + "(?:\\w+:)?\\w+?" + "\\}" internal class SearchUrlBuilder( private val searchEngine: SearchEngine, ) { - fun buildSearchUrl(searchTerms: String): String { + fun buildSearchUrl(searchTerms: String, securityLevel: Int): String { // The parser should have put the best URL for this device at the beginning of the list. - val template = searchEngine.resultUrls[0] + var template = searchEngine.resultUrls[0] + if (securityLevel == 1 && (searchEngine.id == "ddg" || searchEngine.id == "ddg-onion")) { + template = template.replaceFirst("/?", "/html/?") + } return buildUrl(template, searchTerms) } ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/UseCases.kt ===================================== @@ -73,6 +73,7 @@ class UseCases( store, tabsUseCases, sessionUseCases, + engine.settings, ) } View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/6a5b1b… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/6a5b1b… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-128.2.0esr-14.0-1] 2 commits: fixup! [android] Disable features and functionality
by Pier Angelo Vendrame (@pierov) 12 Sep '24

12 Sep '24
Pier Angelo Vendrame pushed to branch tor-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Tor Browser Commits: 6ec046c6 by Dan Ballard at 2024-09-12T10:55:16-07:00 fixup! [android] Disable features and functionality Bug 43046: Disable emailTrackingBlocking in pbm - - - - - 6a5b1bc7 by Dan Ballard at 2024-09-12T10:58:25-07:00 fixup! Firefox preference overrides. Bug 43046: Disable emailTrackingBlocking in pbm - - - - - 3 changed files: - browser/app/profile/001-base-profile.js - mobile/android/android-components/components/concept/engine/src/test/java/mozilla/components/concept/engine/SettingsTest.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/Core.kt Changes: ===================================== browser/app/profile/001-base-profile.js ===================================== @@ -242,6 +242,7 @@ pref("privacy.donottrackheader.enabled", false); // (mullvad-browser#17) // Make sure there is no Tracking Protection active in Tor Browser, see: #17898. pref("privacy.trackingprotection.enabled", false); pref("privacy.trackingprotection.pbmode.enabled", false); +pref("privacy.trackingprotection.emailtracking.pbmode.enabled", false); pref("privacy.trackingprotection.annotate_channels", false); pref("privacy.trackingprotection.cryptomining.enabled", false); pref("privacy.trackingprotection.fingerprinting.enabled", false); ===================================== mobile/android/android-components/components/concept/engine/src/test/java/mozilla/components/concept/engine/SettingsTest.kt ===================================== @@ -180,7 +180,7 @@ class SettingsTest { cookieBannerHandlingDetectOnlyMode = true, cookieBannerHandlingGlobalRules = true, cookieBannerHandlingGlobalRulesSubFrames = true, - emailTrackerBlockingPrivateBrowsing = true, + emailTrackerBlockingPrivateBrowsing = false, ) assertFalse(defaultSettings.domStorageEnabled) ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/Core.kt ===================================== @@ -156,7 +156,7 @@ class Core( cookieBannerHandlingDetectOnlyMode = context.settings().shouldEnableCookieBannerDetectOnly, cookieBannerHandlingGlobalRules = context.settings().shouldEnableCookieBannerGlobalRules, cookieBannerHandlingGlobalRulesSubFrames = context.settings().shouldEnableCookieBannerGlobalRulesSubFrame, - emailTrackerBlockingPrivateBrowsing = true, + emailTrackerBlockingPrivateBrowsing = false, torSecurityLevel = context.settings().torSecurityLevel().intRepresentation, spoofEnglish = context.settings().spoofEnglish, ) View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/ed8735… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/ed8735… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-128.2.0esr-14.0-1] fixup! Bug 41435: Add a Tor Browser migration function
by Pier Angelo Vendrame (@pierov) 12 Sep '24

12 Sep '24
Pier Angelo Vendrame pushed to branch tor-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Tor Browser Commits: ed873553 by Henry Wilkes at 2024-09-12T13:56:21+00:00 fixup! Bug 41435: Add a Tor Browser migration function Bug 43118: Clear user preference for CFR since we have hidden the settings. - - - - - 1 changed file: - browser/components/BrowserGlue.sys.mjs Changes: ===================================== browser/components/BrowserGlue.sys.mjs ===================================== @@ -4862,7 +4862,9 @@ BrowserGlue.prototype = { // (tor-browser#42283). // Version 4: Tor Browser 14.0a4 (2024-09-02): Remove Twitter, Yahoo and // YouTube search engines (tor-browser#41835). - const TBB_MIGRATION_VERSION = 4; + // Version 5: Tor Browser 14.0a5: Clear user preference for CFR settings + // since we hid the UI (tor-browser#43118). + const TBB_MIGRATION_VERSION = 5; const MIGRATION_PREF = "torbrowser.migration.version"; // If we decide to force updating users to pass through any version @@ -4935,6 +4937,14 @@ BrowserGlue.prototype = { "youtube(a)search.mozilla.org", ]); } + if (currentVersion < 5) { + for (const pref of [ + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", + ]) { + Services.prefs.clearUserPref(pref); + } + } Services.prefs.setIntPref(MIGRATION_PREF, TBB_MIGRATION_VERSION); }, View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/ed87355… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/ed87355… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-128.2.0esr-14.0-1] Bug 43118: Hide feature recommendation (CFR) settings.
by Pier Angelo Vendrame (@pierov) 12 Sep '24

12 Sep '24
Pier Angelo Vendrame pushed to branch tor-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Tor Browser Commits: e1319d95 by Henry Wilkes at 2024-09-12T15:47:25+02:00 Bug 43118: Hide feature recommendation (CFR) settings. - - - - - 1 changed file: - browser/components/preferences/main.inc.xhtml Changes: ===================================== browser/components/preferences/main.inc.xhtml ===================================== @@ -777,7 +777,7 @@ support-page="media-keyboard-control" /> </hbox> - <hbox align="center" data-subcategory="cfraddons"> + <hbox align="center" data-subcategory="cfraddons" hidden="true"> <checkbox id="cfrRecommendations" class="tail-with-learn-more" data-l10n-id="browsing-cfr-recommendations" @@ -787,7 +787,7 @@ support-page="extensionrecommendations" /> </hbox> - <hbox align="center" data-subcategory="cfrfeatures"> + <hbox align="center" data-subcategory="cfrfeatures" hidden="true"> <checkbox id="cfrRecommendations-features" class="tail-with-learn-more" data-l10n-id="browsing-cfr-features" View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/e1319d9… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/e1319d9… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-128.2.0esr-14.0-1] Bug 43118: Hide feature recommendation (CFR) settings.
by Pier Angelo Vendrame (@pierov) 12 Sep '24

12 Sep '24
Pier Angelo Vendrame pushed to branch base-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Tor Browser Commits: ec42f6f4 by Henry Wilkes at 2024-09-12T15:46:59+02:00 Bug 43118: Hide feature recommendation (CFR) settings. - - - - - 1 changed file: - browser/components/preferences/main.inc.xhtml Changes: ===================================== browser/components/preferences/main.inc.xhtml ===================================== @@ -777,7 +777,7 @@ support-page="media-keyboard-control" /> </hbox> - <hbox align="center" data-subcategory="cfraddons"> + <hbox align="center" data-subcategory="cfraddons" hidden="true"> <checkbox id="cfrRecommendations" class="tail-with-learn-more" data-l10n-id="browsing-cfr-recommendations" @@ -787,7 +787,7 @@ support-page="extensionrecommendations" /> </hbox> - <hbox align="center" data-subcategory="cfrfeatures"> + <hbox align="center" data-subcategory="cfrfeatures" hidden="true"> <checkbox id="cfrRecommendations-features" class="tail-with-learn-more" data-l10n-id="browsing-cfr-features" View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/ec42f6f… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/ec42f6f… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-128.2.0esr-14.0-1] 2 commits: fixup! MB 34: Hide unsafe and unwanted preferences UI
by Pier Angelo Vendrame (@pierov) 12 Sep '24

12 Sep '24
Pier Angelo Vendrame pushed to branch mullvad-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Mullvad Browser Commits: 33947bf8 by Henry Wilkes at 2024-09-12T11:08:59+01:00 fixup! MB 34: Hide unsafe and unwanted preferences UI Bug 43118: Move patch to hide CRF settings to base-browser. - - - - - e46bd42a by Henry Wilkes at 2024-09-12T11:28:46+01:00 Bug 43118: Hide feature recommendation (CFR) settings. - - - - - 0 changed files: Changes: View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/0f… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/0f… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-128.2.0esr-14.0-1] fixup! Bug 40209: Implement Basic Crypto Safety
by ma1 (@ma1) 12 Sep '24

12 Sep '24
ma1 pushed to branch tor-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Tor Browser Commits: cbb6af14 by Henry Wilkes at 2024-09-12T10:51:21+01:00 fixup! Bug 40209: Implement Basic Crypto Safety Bug 42702: Read clipboard in parent actor rather than child. - - - - - 2 changed files: - browser/actors/CryptoSafetyChild.sys.mjs - browser/actors/CryptoSafetyParent.sys.mjs Changes: ===================================== browser/actors/CryptoSafetyChild.sys.mjs ===================================== @@ -5,12 +5,14 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import { Bech32Decode } from "resource://gre/modules/Bech32Decode.sys.mjs"; - import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; const lazy = {}; +ChromeUtils.defineESModuleGetters(lazy, { + setTimeout: "resource://gre/modules/Timer.sys.mjs", +}); + XPCOMUtils.defineLazyPreferenceGetter( lazy, "isCryptoSafetyEnabled", @@ -18,43 +20,6 @@ XPCOMUtils.defineLazyPreferenceGetter( true // Defaults to true. ); -function looksLikeCryptoAddress(s) { - // P2PKH and P2SH addresses - // https://stackoverflow.com/a/24205650 - const bitcoinAddr = /^[13][a-km-zA-HJ-NP-Z1-9]{25,39}$/; - if (bitcoinAddr.test(s)) { - return true; - } - - // Bech32 addresses - if (Bech32Decode(s) !== null) { - return true; - } - - // regular addresses - const etherAddr = /^0x[a-fA-F0-9]{40}$/; - if (etherAddr.test(s)) { - return true; - } - - // t-addresses - // https://www.reddit.com/r/zec/comments/8mxj6x/simple_regex_to_validate_a_zca… - const zcashAddr = /^t1[a-zA-Z0-9]{33}$/; - if (zcashAddr.test(s)) { - return true; - } - - // Standard, Integrated, and 256-bit Integrated addresses - // https://monero.stackexchange.com/a/10627 - const moneroAddr = - /^4(?:[0-9AB]|[1-9A-HJ-NP-Za-km-z]{12}(?:[1-9A-HJ-NP-Za-km-z]{30})?)[1-9A-HJ-NP-Za-km-z]{93}$/; - if (moneroAddr.test(s)) { - return true; - } - - return false; -} - export class CryptoSafetyChild extends JSWindowActorChild { handleEvent(event) { if ( @@ -70,13 +35,13 @@ export class CryptoSafetyChild extends JSWindowActorChild { return; } - this.contentWindow.navigator.clipboard.readText().then(clipText => { - const selection = clipText.replace(/\s+/g, ""); - if (!looksLikeCryptoAddress(selection)) { - return; - } + // We send a message to the parent to inspect the clipboard content. + // NOTE: We wait until next cycle to allow the event to propagate and fill + // the clipboard before being read. + // NOTE: Using navigator.clipboard.readText fails with Wayland. See + // tor-browser#42702. + lazy.setTimeout(() => { this.sendAsyncMessage("CryptoSafety:CopiedText", { - selection, host: this.document.documentURIObject.host, }); }); ===================================== browser/actors/CryptoSafetyParent.sys.mjs ===================================== @@ -11,6 +11,7 @@ const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { TorDomainIsolator: "resource://gre/modules/TorDomainIsolator.sys.mjs", + Bech32Decode: "resource://gre/modules/Bech32Decode.sys.mjs", }); ChromeUtils.defineLazyGetter(lazy, "CryptoStrings", function () { @@ -24,6 +25,43 @@ XPCOMUtils.defineLazyPreferenceGetter( true // Defaults to true. ); +function looksLikeCryptoAddress(s) { + // P2PKH and P2SH addresses + // https://stackoverflow.com/a/24205650 + const bitcoinAddr = /^[13][a-km-zA-HJ-NP-Z1-9]{25,39}$/; + if (bitcoinAddr.test(s)) { + return true; + } + + // Bech32 addresses + if (lazy.Bech32Decode(s) !== null) { + return true; + } + + // regular addresses + const etherAddr = /^0x[a-fA-F0-9]{40}$/; + if (etherAddr.test(s)) { + return true; + } + + // t-addresses + // https://www.reddit.com/r/zec/comments/8mxj6x/simple_regex_to_validate_a_zca… + const zcashAddr = /^t1[a-zA-Z0-9]{33}$/; + if (zcashAddr.test(s)) { + return true; + } + + // Standard, Integrated, and 256-bit Integrated addresses + // https://monero.stackexchange.com/a/10627 + const moneroAddr = + /^4(?:[0-9AB]|[1-9A-HJ-NP-Za-km-z]{12}(?:[1-9A-HJ-NP-Za-km-z]{30})?)[1-9A-HJ-NP-Za-km-z]{93}$/; + if (moneroAddr.test(s)) { + return true; + } + + return false; +} + export class CryptoSafetyParent extends JSWindowActorParent { async receiveMessage(aMessage) { if ( @@ -33,7 +71,24 @@ export class CryptoSafetyParent extends JSWindowActorParent { return; } - let address = aMessage.data.selection; + // Read the global clipboard. We assume the contents come from the HTTP + // page specified in `aMessage.data.host`. + const trans = Cc["@mozilla.org/widget/transferable;1"].createInstance( + Ci.nsITransferable + ); + trans.init(null); + trans.addDataFlavor("text/plain"); + Services.clipboard.getData(trans, Ci.nsIClipboard.kGlobalClipboard); + let data = {}; + trans.getTransferData("text/plain", data); + data = data?.value.QueryInterface(Ci.nsISupportsString).data; + + let address = data?.replace(/\s+/g, ""); + + if (!address || !looksLikeCryptoAddress(address)) { + return; + } + if (address.length > 32) { address = `${address.substring(0, 32)}…`; } View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/cbb6af1… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/cbb6af1… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-128.2.0esr-14.0-1] squash! MB 213: Customize the search engines list
by Pier Angelo Vendrame (@pierov) 12 Sep '24

12 Sep '24
Pier Angelo Vendrame pushed to branch mullvad-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Mullvad Browser Commits: 0fb4c183 by Pier Angelo Vendrame at 2024-09-12T10:05:30+02:00 squash! MB 213: Customize the search engines list MB 328: Refactor the search engine patch. Upstream switched to a completely different search engine configuration between ESR 115 and ESR 128. We moved our configuration to a couple of JSON files that do not follow upstream&#39;s schemas, as they are overcomplicated for our needs. Also, we keep the old search engine extensions for now, as upstream also kept them, and planned of removing them with Bug 1885953. - - - - - 25 changed files: - + browser/components/search/extensions/brave/favicon.svg - + browser/components/search/extensions/brave/manifest.json - + browser/components/search/extensions/ddg-html/favicon.ico - + browser/components/search/extensions/ddg-html/manifest.json - browser/components/search/extensions/ddg/manifest.json - + browser/components/search/extensions/metager/favicon.ico - + browser/components/search/extensions/metager/manifest.json - + browser/components/search/extensions/mojeek/favicon.ico - + browser/components/search/extensions/mojeek/manifest.json - + browser/components/search/extensions/mullvad-leta/favicon.svg - + browser/components/search/extensions/mullvad-leta/manifest.json - + browser/components/search/extensions/startpage/favicon.png - + browser/components/search/extensions/startpage/manifest.json - toolkit/components/search/AppProvidedSearchEngine.sys.mjs - toolkit/components/search/SearchService.sys.mjs - + toolkit/components/search/content/brave.svg - + toolkit/components/search/content/duckduckgo.ico - + toolkit/components/search/content/metager.ico - + toolkit/components/search/content/mojeek.ico - + toolkit/components/search/content/mullvad-leta.svg - + toolkit/components/search/content/mullvadBrowserSearchEngineIcons.json - + toolkit/components/search/content/mullvadBrowserSearchEngines.json - + toolkit/components/search/content/startpage.png - + toolkit/components/search/jar.mn - toolkit/components/search/moz.build Changes: ===================================== browser/components/search/extensions/brave/favicon.svg ===================================== @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256pt" height="256pt" viewBox="0 0 256 256" version="1.1"> +<defs> +<linearGradient id="linear0" gradientUnits="userSpaceOnUse" x1="-0.031" y1="44.365" x2="26.596" y2="44.365" gradientTransform="matrix(8.192708,0,0,8.192708,19.181924,-235.46158)"> +<stop offset="0" style="stop-color:rgb(94.509804%,33.72549%,16.862745%);stop-opacity:1;"/> +<stop offset="0.3" style="stop-color:rgb(94.509804%,32.941176%,16.862745%);stop-opacity:1;"/> +<stop offset="0.41" style="stop-color:rgb(94.117647%,30.196078%,16.470588%);stop-opacity:1;"/> +<stop offset="0.49" style="stop-color:rgb(93.72549%,25.882353%,16.078431%);stop-opacity:1;"/> +<stop offset="0.5" style="stop-color:rgb(93.72549%,25.098039%,16.078431%);stop-opacity:1;"/> +<stop offset="0.56" style="stop-color:rgb(90.980392%,24.313725%,15.686275%);stop-opacity:1;"/> +<stop offset="0.67" style="stop-color:rgb(88.235294%,23.529412%,14.901961%);stop-opacity:1;"/> +<stop offset="1" style="stop-color:rgb(87.45098%,23.529412%,14.901961%);stop-opacity:1;"/> +</linearGradient> +</defs> +<g id="surface1"> +<path style=" stroke:none;fill-rule:nonzero;fill:url(#linear0);" d="M 237.148438 82.824219 L 229.25 61.386719 L 234.742188 49.078125 C 235.445312 47.488281 235.101562 45.636719 233.878906 44.394531 L 218.953125 29.300781 C 212.414062 22.660156 202.628906 20.390625 193.835938 23.46875 L 189.738281 24.917969 L 166.9375 0.210938 L 128.003906 -0.00390625 L 89.074219 0.300781 L 66.296875 25.207031 L 62.242188 23.773438 C 53.386719 20.65625 43.53125 22.949219 36.960938 29.65625 L 21.671875 45.03125 C 20.695312 46.019531 20.425781 47.5 20.992188 48.769531 L 26.726562 61.546875 L 18.863281 82.972656 L 47.101562 190.355469 C 49.773438 200.496094 55.910156 209.386719 64.453125 215.472656 L 120.304688 253.324219 C 124.820312 256.933594 131.238281 256.933594 135.757812 253.324219 L 191.574219 215.414062 C 200.109375 209.328125 206.320312 200.441406 208.902344 190.296875 L 231.9375 102.210938 Z M 237.148438 82.824219 "/> +<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 134.378906 158.691406 C 132.902344 158.03125 131.382812 157.476562 129.824219 157.039062 L 127.078125 157.039062 C 125.523438 157.476562 124 158.03125 122.523438 158.691406 L 115.617188 161.5625 L 107.816406 165.152344 L 95.113281 171.773438 C 94.171875 172.074219 93.511719 172.925781 93.445312 173.910156 C 93.375 174.898438 93.914062 175.832031 94.804688 176.257812 L 105.832031 184 C 108.179688 185.679688 110.441406 187.476562 112.613281 189.382812 L 115.714844 192.054688 L 122.210938 197.742188 L 125.15625 200.34375 C 127.035156 201.902344 129.757812 201.902344 131.636719 200.34375 L 144.332031 189.253906 L 151.132812 183.867188 L 162.164062 175.972656 C 163.0625 175.546875 163.605469 174.613281 163.527344 173.621094 C 163.453125 172.628906 162.777344 171.789062 161.824219 171.503906 L 149.144531 165.105469 L 141.304688 161.515625 Z M 212.601562 87.613281 L 213 86.464844 C 213.019531 84.929688 212.921875 83.394531 212.710938 81.871094 C 211.644531 79.152344 210.3125 76.566406 208.621094 74.152344 L 201.445312 63.621094 L 196.332031 56.675781 L 186.714844 44.675781 C 185.835938 43.503906 184.882812 42.386719 183.863281 41.339844 L 183.664062 41.339844 L 179.390625 42.128906 L 158.257812 46.199219 C 156.117188 46.300781 153.976562 45.988281 151.960938 45.28125 L 140.351562 41.53125 L 132.042969 39.234375 C 129.605469 38.976562 127.144531 38.976562 124.707031 39.234375 L 116.398438 41.554688 L 104.792969 45.324219 C 102.769531 46.027344 100.632812 46.339844 98.496094 46.242188 L 77.382812 42.242188 L 73.113281 41.457031 L 72.910156 41.457031 C 71.886719 42.503906 70.9375 43.617188 70.058594 44.792969 L 60.460938 56.792969 C 58.671875 59.042969 56.964844 61.359375 55.347656 63.734375 L 48.171875 74.269531 L 44.78125 79.921875 C 44.164062 82.09375 43.839844 84.335938 43.8125 86.601562 L 44.210938 87.746094 C 44.382812 88.484375 44.613281 89.210938 44.875 89.921875 L 50.542969 96.433594 L 75.664062 123.128906 C 77.363281 125.109375 77.851562 127.859375 76.9375 130.304688 L 72.710938 140 C 71.777344 142.582031 71.707031 145.394531 72.515625 148.019531 L 73.339844 150.28125 C 74.6875 153.953125 77 157.191406 80.03125 159.664062 L 83.980469 162.875 C 86.058594 164.378906 88.78125 164.703125 91.15625 163.734375 L 105.1875 157.042969 C 107.765625 155.757812 110.175781 154.160156 112.363281 152.285156 L 123.597656 142.148438 C 124.5 141.332031 125.035156 140.183594 125.074219 138.96875 C 125.117188 137.75 124.667969 136.570312 123.828125 135.6875 L 98.476562 118.609375 C 96.496094 117.199219 95.839844 114.554688 96.933594 112.382812 L 106.765625 93.902344 C 107.890625 91.621094 108.066406 88.980469 107.246094 86.566406 C 106.027344 84.289062 104.054688 82.5 101.667969 81.507812 L 70.84375 69.90625 C 68.621094 69.109375 68.742188 68.109375 71.097656 67.972656 L 89.199219 66.171875 C 92.039062 65.992188 94.890625 66.246094 97.652344 66.925781 L 113.402344 71.324219 C 115.714844 72.019531 117.164062 74.324219 116.777344 76.707031 L 110.589844 110.507812 C 110.175781 112.378906 110.070312 114.308594 110.285156 116.210938 C 110.535156 117.019531 112.652344 118.011719 114.964844 118.578125 L 124.5625 120.578125 C 127.351562 121.09375 130.207031 121.09375 132.996094 120.578125 L 141.625 118.578125 C 143.945312 118.058594 146.035156 116.964844 146.304688 116.15625 C 146.511719 114.25 146.402344 112.324219 145.984375 110.453125 L 139.761719 76.652344 C 139.382812 74.265625 140.824219 71.96875 143.132812 71.269531 L 158.882812 66.855469 C 161.648438 66.175781 164.496094 65.921875 167.335938 66.105469 L 185.441406 67.792969 C 187.808594 68.007812 187.921875 68.886719 185.707031 69.726562 L 154.90625 81.40625 C 152.511719 82.386719 150.539062 84.179688 149.328125 86.46875 C 148.511719 88.878906 148.683594 91.519531 149.808594 93.804688 L 159.65625 112.285156 C 160.75 114.457031 160.09375 117.101562 158.113281 118.507812 L 132.78125 135.628906 C 131.941406 136.507812 131.492188 137.691406 131.535156 138.90625 C 131.582031 140.121094 132.113281 141.269531 133.011719 142.089844 L 144.261719 152.222656 C 146.453125 154.085938 148.859375 155.675781 151.4375 156.960938 L 165.46875 163.640625 C 167.851562 164.601562 170.5625 164.273438 172.644531 162.761719 L 176.59375 159.53125 C 179.628906 157.058594 181.941406 153.808594 183.285156 150.132812 L 184.109375 147.871094 C 184.914062 145.25 184.847656 142.433594 183.910156 139.851562 L 179.785156 130.109375 C 178.875 127.664062 179.363281 124.917969 181.054688 122.933594 L 206.175781 96.199219 L 211.828125 89.6875 C 212.128906 89 212.390625 88.289062 212.601562 87.566406 Z M 212.601562 87.613281 "/> +</g> +</svg> ===================================== browser/components/search/extensions/brave/manifest.json ===================================== @@ -0,0 +1,31 @@ +{ + "name": "Brave Search", + "manifest_version": 2, + "version": "1.0", + "applications": { + "gecko": { + "id": "brave(a)search.mozilla.org" + } + }, + "hidden": true, + "icons": { + "16": "favicon.svg", + "32": "favicon.svg", + "96": "favicon.svg", + "128": "favicon.svg" + }, + "web_accessible_resources": [ + "favicon.svg" + ], + "chrome_settings_overrides": { + "search_provider": { + "name": "Brave Search", + "keyword": ["@brave", "@bv"], + "search_form": "https://search.brave.com/search", + "search_url": "https://search.brave.com/search", + "search_url_get_params": "q={searchTerms}", + "suggest_url": "https://search.brave.com/api/suggest", + "suggest_url_get_params": "q={searchTerms}" + } + } +} ===================================== browser/components/search/extensions/ddg-html/favicon.ico ===================================== Binary files /dev/null and b/browser/components/search/extensions/ddg-html/favicon.ico differ ===================================== browser/components/search/extensions/ddg-html/manifest.json ===================================== @@ -0,0 +1,27 @@ +{ + "name": "DuckDuckGo HTML", + "description": "Search DuckDuckGo HTML", + "manifest_version": 2, + "version": "1.4", + "browser_specific_settings": { + "gecko": { + "id": "ddg-html(a)search.mozilla.org" + } + }, + "hidden": true, + "icons": { + "16": "favicon.ico" + }, + "web_accessible_resources": ["favicon.ico"], + "chrome_settings_overrides": { + "search_provider": { + "keyword": ["@duckduckgohtml", "@ddgh"], + "name": "DuckDuckGo HTML", + "search_url": "https://html.duckduckgo.com/html/", + "search_form": "https://html.duckduckgo.com/html/", + "search_url_get_params": "q={searchTerms}", + "suggest_url": "https://duckduckgo.com/ac/", + "suggest_url_get_params": "q={searchTerms}&type=list" + } + } +} ===================================== browser/components/search/extensions/ddg/manifest.json ===================================== @@ -19,7 +19,7 @@ "name": "DuckDuckGo", "search_url": "https://duckduckgo.com/", "search_form": "https://duckduckgo.com/", - "search_url_get_params": "t=ffab&q={searchTerms}", + "search_url_get_params": "q={searchTerms}", "suggest_url": "https://ac.duckduckgo.com/ac/", "suggest_url_get_params": "q={searchTerms}&type=list" } ===================================== browser/components/search/extensions/metager/favicon.ico ===================================== Binary files /dev/null and b/browser/components/search/extensions/metager/favicon.ico differ ===================================== browser/components/search/extensions/metager/manifest.json ===================================== @@ -0,0 +1,27 @@ +{ + "name": "MetaGer (en)", + "manifest_version": 2, + "version": "1.0", + "applications": { + "gecko": { + "id": "metager(a)search.mozilla.org" + } + }, + "hidden": true, + "icons": { + "16": "favicon.ico", + "32": "favicon.ico", + "96": "favicon.ico", + "128": "favicon.ico" + }, + "web_accessible_resources": [ + "favicon.ico" + ], + "chrome_settings_overrides": { + "search_provider": { + "name": "MetaGer", + "keyword": ["@metager", "@mg"], + "search_url": "https://metager.org/meta/meta.ger3?eingabe={searchTerms}" + } + } +} ===================================== browser/components/search/extensions/mojeek/favicon.ico ===================================== Binary files /dev/null and b/browser/components/search/extensions/mojeek/favicon.ico differ ===================================== browser/components/search/extensions/mojeek/manifest.json ===================================== @@ -0,0 +1,24 @@ +{ + "name": "Mojeek", + "manifest_version": 2, + "version": "1.0", + "browser_specific_settings": { + "gecko": { + "id": "mojeek(a)search.mozilla.org" + } + }, + "hidden": true, + "icons": { + "16": "favicon.ico", + "32": "favicon.ico" + }, + "web_accessible_resources": ["favicon.ico"], + "chrome_settings_overrides": { + "search_provider": { + "keyword": ["@mj", "@mojeek"], + "name": "Mojeek", + "search_url": "https://www.mojeek.com/search", + "search_url_get_params": "q={searchTerms}" + } + } +} ===================================== browser/components/search/extensions/mullvad-leta/favicon.svg ===================================== @@ -0,0 +1,25 @@ +<svg xmlns="http://www.w3.org/2000/svg" id="Mullvad_VPN_Logo_Positive" x="0" y="0" version="1.1" + viewBox="0 0 252.70001 252.6" xml:space="preserve"> + <g id="Logo" transform="translate(-566.2 -73.7)"> + <path id="bg" fill="#192e45" fill-rule="evenodd" + d="M566.2 200c0 69.8 56.6 126.3 126.3 126.3 69.7 0 126.4-56.5 126.4-126.3S762.3 73.7 692.5 73.7c-69.8 0-126.3 56.5-126.3 126.3z" + clip-rule="evenodd" /> + <path id="Mullvad_Fur" fill="#d0933a" fill-rule="evenodd" + d="M583.1 184.9l9.6-13.4c0 .1-.6 19.3-.6 19.3l2.7-14.5c8 16.2 27.6 38.6 45.5 50.6 1.9 1.3 3.5 2.7 4.6 4.1 2.3.9 4.6 1.4 6.9 1.8 1.2.2 2.5.3 3.7.4 1.2.1 2.5.1 3.7.1 1.2 0 2.4-.1 3.6-.2 1.2-.1 2.4-.3 3.6-.5 1.2-.2 2.4-.4 3.5-.8 1.2-.3 2.3-.6 3.5-1 1.1-.3 2.3-.8 3.4-1.2 1.1-.5 2.2-.9 3.3-1.5 1.1-.6 2.2-1.1 3.2-1.7 1.1-.5 2.1-1.2 3.2-1.8 1.1-.6 2.1-1.3 3.2-1.9 1.1-.6 2.1-1.3 3.1-1.9 1-.7 2.1-1.3 3.1-2s2.1-1.3 3.2-2l1-.6.5.3 7.2 4.8-7.3-1.9c-.7.8-1.4 1.6-2.2 2.4-.9.9-1.9 1.8-2.8 2.7-1 .8-2 1.7-3.1 2.4-1.1.8-2.1 1.5-3.3 2.2-2.2 1.4-4.6 2.6-7.1 3.6-1.2.5-2.5 1-3.7 1.4-1.3.4-2.5.8-3.8 1.1-1.3.3-2.6.6-3.9.8-1.3.2-2.6.3-3.9.5-2.6.1-5.3.1-7.9-.3-1.3-.2-2.6-.4-3.9-.7-1.3-.3-2.5-.7-3.7-1.1-2.1-.8-4.2-1.8-6.1-3 0 0-6.9 1-4.1 6.2 2.8 5.2 7 4.7 5 10.8-1.4 3.3-3.4 6.5-5.6 9.5-4.6 6.2-11.8 11.7-11.1 15 32.7 40.3 106.4 34.7 134.4-1.3-.4-5.2-8.6-7.7-14.3-20.4 1.6.5 4 1.2 4 1.1 0-.1-6.8-11.1-7.1-12.2l4.4.3s-5.8-7.2-6-7.9l5.9-.8s-7.4-8.5-7.5-9.2l7.5 1.2-8.2-9.9h3.9l-4.6-6.7c-.8-.3-1.6-.5-2.4-.7l-3-.9c-11.2-3.5-21.8-6.7-32-13.1-14.3-8.9-27.1-19.8-36.7-28.3l-19.3-9.4c-18.5-1.4-35.9-.9-46.5 1.2l6.8-11.6-10.4 12.5c-.7-.2-.9-.6-.9-.6l.7-15.4-3.3 13.9c-1-.5-2.2-.7-3.4-.7-4.6 0-8.3 3.7-8.3 8.3 0 4.2 3.1 7.7 7.2 8.2l-7.1 14.4z" + clip-rule="evenodd" /> + <path id="Mullvad_Nose" fill="#ffcc86" fill-rule="evenodd" + d="M594.8 154.5c-1-.4-2.2-.7-3.3-.7-4.6 0-8.3 3.7-8.3 8.3 0 4 2.9 7.4 6.7 8.2h.2c2.5-.8 7.5-7.5 6.7-11.7-.4-1.5-1-2.9-2-4.1z" + clip-rule="evenodd" /> + <path id="Mullvad_Helmet" fill="#fdd321" fill-rule="evenodd" + d="M667.6 143.8c-1.5-4.1-1.1-9.4 1-14.4 3-6.9 8.7-11.5 14.1-11.5 1.1 0 2.1.2 3.1.6 3.1-2.8 6.7-5.1 10.7-6.7 22.1-8.8 54.4 6.9 62.7 28.6 4 10.5 2.8 22-.6 32.5-2.8 8.6-13 21-9.2 30.4-1.5-.4-33.1-10.2-41.9-15.8-14.1-8.8-26.8-19.6-36.3-28l-.3-.3-32.1-15.2c-.4-.2-.8-.4-1.1-.6 4.6 0 22.1 2.1 29.9.4" + clip-rule="evenodd" /> + <g id="Helmet_Lamp"> + <path id="path113" fill="#fff" + d="M677.1 147.4c-.9 0-1.6-.2-2.3-.5-1.6-.7-2.8-2-3.6-4-1.4-3.4-1-8.1.9-12.5 2.5-5.6 7.3-9.7 11.5-9.7.8 0 1.6.2 2.4.5 2.1.9 3.6 3 4.1 6 .6 3.2.1 6.9-1.5 10.4-2.4 5.7-7.3 9.8-11.5 9.8z" /> + <g id="g117"> + <path id="path115" fill="#1d2a3a" + d="M683.6 122.3c.6 0 1.2.1 1.8.4 1.6.7 2.8 2.5 3.2 4.9.5 2.9.1 6.3-1.4 9.5-2.2 5.1-6.5 8.8-10.1 8.8-.6 0-1.2-.1-1.7-.3-1.5-.6-2.3-2-2.7-3.1-1.2-3-.9-7.4.8-11.4 2.2-5.1 6.5-8.8 10.1-8.8m0-3c-4.8 0-10.1 4.4-12.9 10.7-2.1 4.7-2.4 9.8-.9 13.7.9 2.3 2.4 3.9 4.3 4.8.9.4 1.9.6 3 .6 4.8 0 10.1-4.4 12.8-10.7 1.7-3.8 2.2-7.8 1.6-11.3-.6-3.5-2.4-6-5-7.1-.9-.5-1.9-.7-2.9-.7z" /> + </g> + </g> + </g> +</svg> ===================================== browser/components/search/extensions/mullvad-leta/manifest.json ===================================== @@ -0,0 +1,26 @@ +{ + "name": "Mullvad Leta", + "manifest_version": 2, + "version": "1.0", + "browser_specific_settings": { + "gecko": { + "id": "mullvad-leta(a)search.mozilla.org" + } + }, + "hidden": true, + "icons": { + "16": "favicon.svg", + "32": "favicon.svg", + "96": "favicon.svg", + "128": "favicon.svg" + }, + "web_accessible_resources": ["favicon.svg"], + "chrome_settings_overrides": { + "search_provider": { + "keyword": ["@leta", "@mullvad", "@ml"], + "name": "Mullvad Leta", + "search_url": "https://leta.mullvad.net/", + "search_url_get_params": "q={searchTerms}" + } + } +} ===================================== browser/components/search/extensions/startpage/favicon.png ===================================== Binary files /dev/null and b/browser/components/search/extensions/startpage/favicon.png differ ===================================== browser/components/search/extensions/startpage/manifest.json ===================================== @@ -0,0 +1,27 @@ +{ + "name": "Startpage", + "description": "Startpage", + "manifest_version": 2, + "version": "1.0", + "applications": { + "gecko": { + "id": "startpage(a)search.mozilla.org" + } + }, + "hidden": true, + "icons": { + "16": "favicon.png" + }, + "web_accessible_resources": [ + "favicon.png" + ], + "chrome_settings_overrides": { + "search_provider": { + "name": "Startpage", + "keyword": ["@startpage", "@sp"], + "search_url": "https://www.startpage.com/sp/search", + "search_form": "https://www.startpage.com/sp/search/", + "search_url_post_params": "q={searchTerms}" + } + } +} ===================================== toolkit/components/search/AppProvidedSearchEngine.sys.mjs ===================================== @@ -84,6 +84,8 @@ class IconHandler { await this.#getIconList(); } + return this.#iconList.get(engineIdentifier); + // eslint-disable-next-line no-unreachable let iconRecords = this.#iconList.filter(r => this._identifierMatches(engineIdentifier, r.engineIdentifiers) ); @@ -210,12 +212,18 @@ class IconHandler { */ async #getIconList() { try { - this.#iconList = await this.#iconCollection.get(); + this.#iconList = new Map( + await ( + await fetch( + "chrome://global/content/search/mullvadBrowserSearchEngineIcons.json" + ) + ).json() + ); } catch (ex) { console.error(ex); - this.#iconList = []; + this.#iconList = null; } - if (!this.#iconList.length) { + if (!this.#iconList) { console.error("Failed to obtain search engine icon list records"); } } ===================================== toolkit/components/search/SearchService.sys.mjs ===================================== @@ -2582,113 +2582,11 @@ export class SearchService { // This is prefixed with _ rather than # because it is // called in test_remove_engine_notification_box.js async _fetchEngineSelectorEngines() { - const engines = [ - { - aliases: ["duckduckgo", "ddg"], - name: "DuckDuckGo", - urls: { - search: { - base: "https://duckduckgo.com/", - params: [], - searchTermParamName: "q", - }, - }, - id: "04e99a38-13ee-47d8-8aa4-64482b3dea99", - identifier: "ddg", - recordType: "engine", - variants: [], - }, - { - aliases: ["ddg-html", "duckduckgohtml", "ddgh"], - name: "DuckDuckGo (HTML)", - urls: { - search: { - base: "https://html.duckduckgo.com/html/", - params: [], - searchTermParamName: "q", - }, - }, - id: "98d8c84b-7455-431d-98b9-890e7bcc0041", - identifier: "ddg-html", - recordType: "engine", - variants: [], - }, - { - aliases: ["mullvad-leta", "leta", "mullvad", "ml"], - name: "Mullvad Leta", - urls: { - search: { - base: "https://leta.mullvad.net/", - params: [], - searchTermParamName: "q", - }, - }, - id: "ee88d691-6d7a-4adb-9fec-5a205565505a", - identifier: "mullvad-leta", - recordType: "engine", - variants: [], - }, - { - aliases: ["mojeek", "mj"], - name: "Mojeek", - urls: { - search: { - base: "https://www.mojeek.com/search", - params: [], - searchTermParamName: "q", - }, - }, - id: "10df12ac-2b39-4aa9-8845-d5b35d5bb70c", - identifier: "mojeek", - recordType: "engine", - variants: [], - }, - { - aliases: ["brave", "bv"], - name: "Brave Search", - urls: { - search: { - base: "https://search.brave.com/search", - params: [], - searchTermParamName: "q", - }, - }, - id: "f479314b-030b-49a8-a2fe-7e1c5d1d9071", - identifier: "brave", - recordType: "engine", - variants: [], - }, - { - aliases: ["startpage", "sp"], - name: "Startpage", - urls: { - search: { - base: "https://www.startpage.com/sp/search", - params: [], - searchTermParamName: "q", - }, - }, - id: "049f86fd-28fe-4389-910f-aac28f07d745", - identifier: "startpage", - recordType: "engine", - variants: [], - }, - { - aliases: ["metager", "mg"], - name: "MetaGer", - urls: { - search: { - base: "https://metager.org/meta/meta.ger3", - params: [], - searchTermParamName: "eingabe", - }, - }, - id: "a9d07d93-469c-4bf4-8dd1-fa137f1cc85f", - identifier: "metager", - recordType: "engine", - variants: [], - }, - ]; + const engines = await ( + await fetch( + "chrome://global/content/search/mullvadBrowserSearchEngines.json" + ) + ).json(); for (let e of engines) { if (!e.webExtension) { ===================================== toolkit/components/search/content/brave.svg ===================================== @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256pt" height="256pt" viewBox="0 0 256 256" version="1.1"> +<defs> +<linearGradient id="linear0" gradientUnits="userSpaceOnUse" x1="-0.031" y1="44.365" x2="26.596" y2="44.365" gradientTransform="matrix(8.192708,0,0,8.192708,19.181924,-235.46158)"> +<stop offset="0" style="stop-color:rgb(94.509804%,33.72549%,16.862745%);stop-opacity:1;"/> +<stop offset="0.3" style="stop-color:rgb(94.509804%,32.941176%,16.862745%);stop-opacity:1;"/> +<stop offset="0.41" style="stop-color:rgb(94.117647%,30.196078%,16.470588%);stop-opacity:1;"/> +<stop offset="0.49" style="stop-color:rgb(93.72549%,25.882353%,16.078431%);stop-opacity:1;"/> +<stop offset="0.5" style="stop-color:rgb(93.72549%,25.098039%,16.078431%);stop-opacity:1;"/> +<stop offset="0.56" style="stop-color:rgb(90.980392%,24.313725%,15.686275%);stop-opacity:1;"/> +<stop offset="0.67" style="stop-color:rgb(88.235294%,23.529412%,14.901961%);stop-opacity:1;"/> +<stop offset="1" style="stop-color:rgb(87.45098%,23.529412%,14.901961%);stop-opacity:1;"/> +</linearGradient> +</defs> +<g id="surface1"> +<path style=" stroke:none;fill-rule:nonzero;fill:url(#linear0);" d="M 237.148438 82.824219 L 229.25 61.386719 L 234.742188 49.078125 C 235.445312 47.488281 235.101562 45.636719 233.878906 44.394531 L 218.953125 29.300781 C 212.414062 22.660156 202.628906 20.390625 193.835938 23.46875 L 189.738281 24.917969 L 166.9375 0.210938 L 128.003906 -0.00390625 L 89.074219 0.300781 L 66.296875 25.207031 L 62.242188 23.773438 C 53.386719 20.65625 43.53125 22.949219 36.960938 29.65625 L 21.671875 45.03125 C 20.695312 46.019531 20.425781 47.5 20.992188 48.769531 L 26.726562 61.546875 L 18.863281 82.972656 L 47.101562 190.355469 C 49.773438 200.496094 55.910156 209.386719 64.453125 215.472656 L 120.304688 253.324219 C 124.820312 256.933594 131.238281 256.933594 135.757812 253.324219 L 191.574219 215.414062 C 200.109375 209.328125 206.320312 200.441406 208.902344 190.296875 L 231.9375 102.210938 Z M 237.148438 82.824219 "/> +<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 134.378906 158.691406 C 132.902344 158.03125 131.382812 157.476562 129.824219 157.039062 L 127.078125 157.039062 C 125.523438 157.476562 124 158.03125 122.523438 158.691406 L 115.617188 161.5625 L 107.816406 165.152344 L 95.113281 171.773438 C 94.171875 172.074219 93.511719 172.925781 93.445312 173.910156 C 93.375 174.898438 93.914062 175.832031 94.804688 176.257812 L 105.832031 184 C 108.179688 185.679688 110.441406 187.476562 112.613281 189.382812 L 115.714844 192.054688 L 122.210938 197.742188 L 125.15625 200.34375 C 127.035156 201.902344 129.757812 201.902344 131.636719 200.34375 L 144.332031 189.253906 L 151.132812 183.867188 L 162.164062 175.972656 C 163.0625 175.546875 163.605469 174.613281 163.527344 173.621094 C 163.453125 172.628906 162.777344 171.789062 161.824219 171.503906 L 149.144531 165.105469 L 141.304688 161.515625 Z M 212.601562 87.613281 L 213 86.464844 C 213.019531 84.929688 212.921875 83.394531 212.710938 81.871094 C 211.644531 79.152344 210.3125 76.566406 208.621094 74.152344 L 201.445312 63.621094 L 196.332031 56.675781 L 186.714844 44.675781 C 185.835938 43.503906 184.882812 42.386719 183.863281 41.339844 L 183.664062 41.339844 L 179.390625 42.128906 L 158.257812 46.199219 C 156.117188 46.300781 153.976562 45.988281 151.960938 45.28125 L 140.351562 41.53125 L 132.042969 39.234375 C 129.605469 38.976562 127.144531 38.976562 124.707031 39.234375 L 116.398438 41.554688 L 104.792969 45.324219 C 102.769531 46.027344 100.632812 46.339844 98.496094 46.242188 L 77.382812 42.242188 L 73.113281 41.457031 L 72.910156 41.457031 C 71.886719 42.503906 70.9375 43.617188 70.058594 44.792969 L 60.460938 56.792969 C 58.671875 59.042969 56.964844 61.359375 55.347656 63.734375 L 48.171875 74.269531 L 44.78125 79.921875 C 44.164062 82.09375 43.839844 84.335938 43.8125 86.601562 L 44.210938 87.746094 C 44.382812 88.484375 44.613281 89.210938 44.875 89.921875 L 50.542969 96.433594 L 75.664062 123.128906 C 77.363281 125.109375 77.851562 127.859375 76.9375 130.304688 L 72.710938 140 C 71.777344 142.582031 71.707031 145.394531 72.515625 148.019531 L 73.339844 150.28125 C 74.6875 153.953125 77 157.191406 80.03125 159.664062 L 83.980469 162.875 C 86.058594 164.378906 88.78125 164.703125 91.15625 163.734375 L 105.1875 157.042969 C 107.765625 155.757812 110.175781 154.160156 112.363281 152.285156 L 123.597656 142.148438 C 124.5 141.332031 125.035156 140.183594 125.074219 138.96875 C 125.117188 137.75 124.667969 136.570312 123.828125 135.6875 L 98.476562 118.609375 C 96.496094 117.199219 95.839844 114.554688 96.933594 112.382812 L 106.765625 93.902344 C 107.890625 91.621094 108.066406 88.980469 107.246094 86.566406 C 106.027344 84.289062 104.054688 82.5 101.667969 81.507812 L 70.84375 69.90625 C 68.621094 69.109375 68.742188 68.109375 71.097656 67.972656 L 89.199219 66.171875 C 92.039062 65.992188 94.890625 66.246094 97.652344 66.925781 L 113.402344 71.324219 C 115.714844 72.019531 117.164062 74.324219 116.777344 76.707031 L 110.589844 110.507812 C 110.175781 112.378906 110.070312 114.308594 110.285156 116.210938 C 110.535156 117.019531 112.652344 118.011719 114.964844 118.578125 L 124.5625 120.578125 C 127.351562 121.09375 130.207031 121.09375 132.996094 120.578125 L 141.625 118.578125 C 143.945312 118.058594 146.035156 116.964844 146.304688 116.15625 C 146.511719 114.25 146.402344 112.324219 145.984375 110.453125 L 139.761719 76.652344 C 139.382812 74.265625 140.824219 71.96875 143.132812 71.269531 L 158.882812 66.855469 C 161.648438 66.175781 164.496094 65.921875 167.335938 66.105469 L 185.441406 67.792969 C 187.808594 68.007812 187.921875 68.886719 185.707031 69.726562 L 154.90625 81.40625 C 152.511719 82.386719 150.539062 84.179688 149.328125 86.46875 C 148.511719 88.878906 148.683594 91.519531 149.808594 93.804688 L 159.65625 112.285156 C 160.75 114.457031 160.09375 117.101562 158.113281 118.507812 L 132.78125 135.628906 C 131.941406 136.507812 131.492188 137.691406 131.535156 138.90625 C 131.582031 140.121094 132.113281 141.269531 133.011719 142.089844 L 144.261719 152.222656 C 146.453125 154.085938 148.859375 155.675781 151.4375 156.960938 L 165.46875 163.640625 C 167.851562 164.601562 170.5625 164.273438 172.644531 162.761719 L 176.59375 159.53125 C 179.628906 157.058594 181.941406 153.808594 183.285156 150.132812 L 184.109375 147.871094 C 184.914062 145.25 184.847656 142.433594 183.910156 139.851562 L 179.785156 130.109375 C 178.875 127.664062 179.363281 124.917969 181.054688 122.933594 L 206.175781 96.199219 L 211.828125 89.6875 C 212.128906 89 212.390625 88.289062 212.601562 87.566406 Z M 212.601562 87.613281 "/> +</g> +</svg> ===================================== toolkit/components/search/content/duckduckgo.ico ===================================== Binary files /dev/null and b/toolkit/components/search/content/duckduckgo.ico differ ===================================== toolkit/components/search/content/metager.ico ===================================== Binary files /dev/null and b/toolkit/components/search/content/metager.ico differ ===================================== toolkit/components/search/content/mojeek.ico ===================================== Binary files /dev/null and b/toolkit/components/search/content/mojeek.ico differ ===================================== toolkit/components/search/content/mullvad-leta.svg ===================================== @@ -0,0 +1,25 @@ +<svg xmlns="http://www.w3.org/2000/svg" id="Mullvad_VPN_Logo_Positive" x="0" y="0" version="1.1" + viewBox="0 0 252.70001 252.6" xml:space="preserve"> + <g id="Logo" transform="translate(-566.2 -73.7)"> + <path id="bg" fill="#192e45" fill-rule="evenodd" + d="M566.2 200c0 69.8 56.6 126.3 126.3 126.3 69.7 0 126.4-56.5 126.4-126.3S762.3 73.7 692.5 73.7c-69.8 0-126.3 56.5-126.3 126.3z" + clip-rule="evenodd" /> + <path id="Mullvad_Fur" fill="#d0933a" fill-rule="evenodd" + d="M583.1 184.9l9.6-13.4c0 .1-.6 19.3-.6 19.3l2.7-14.5c8 16.2 27.6 38.6 45.5 50.6 1.9 1.3 3.5 2.7 4.6 4.1 2.3.9 4.6 1.4 6.9 1.8 1.2.2 2.5.3 3.7.4 1.2.1 2.5.1 3.7.1 1.2 0 2.4-.1 3.6-.2 1.2-.1 2.4-.3 3.6-.5 1.2-.2 2.4-.4 3.5-.8 1.2-.3 2.3-.6 3.5-1 1.1-.3 2.3-.8 3.4-1.2 1.1-.5 2.2-.9 3.3-1.5 1.1-.6 2.2-1.1 3.2-1.7 1.1-.5 2.1-1.2 3.2-1.8 1.1-.6 2.1-1.3 3.2-1.9 1.1-.6 2.1-1.3 3.1-1.9 1-.7 2.1-1.3 3.1-2s2.1-1.3 3.2-2l1-.6.5.3 7.2 4.8-7.3-1.9c-.7.8-1.4 1.6-2.2 2.4-.9.9-1.9 1.8-2.8 2.7-1 .8-2 1.7-3.1 2.4-1.1.8-2.1 1.5-3.3 2.2-2.2 1.4-4.6 2.6-7.1 3.6-1.2.5-2.5 1-3.7 1.4-1.3.4-2.5.8-3.8 1.1-1.3.3-2.6.6-3.9.8-1.3.2-2.6.3-3.9.5-2.6.1-5.3.1-7.9-.3-1.3-.2-2.6-.4-3.9-.7-1.3-.3-2.5-.7-3.7-1.1-2.1-.8-4.2-1.8-6.1-3 0 0-6.9 1-4.1 6.2 2.8 5.2 7 4.7 5 10.8-1.4 3.3-3.4 6.5-5.6 9.5-4.6 6.2-11.8 11.7-11.1 15 32.7 40.3 106.4 34.7 134.4-1.3-.4-5.2-8.6-7.7-14.3-20.4 1.6.5 4 1.2 4 1.1 0-.1-6.8-11.1-7.1-12.2l4.4.3s-5.8-7.2-6-7.9l5.9-.8s-7.4-8.5-7.5-9.2l7.5 1.2-8.2-9.9h3.9l-4.6-6.7c-.8-.3-1.6-.5-2.4-.7l-3-.9c-11.2-3.5-21.8-6.7-32-13.1-14.3-8.9-27.1-19.8-36.7-28.3l-19.3-9.4c-18.5-1.4-35.9-.9-46.5 1.2l6.8-11.6-10.4 12.5c-.7-.2-.9-.6-.9-.6l.7-15.4-3.3 13.9c-1-.5-2.2-.7-3.4-.7-4.6 0-8.3 3.7-8.3 8.3 0 4.2 3.1 7.7 7.2 8.2l-7.1 14.4z" + clip-rule="evenodd" /> + <path id="Mullvad_Nose" fill="#ffcc86" fill-rule="evenodd" + d="M594.8 154.5c-1-.4-2.2-.7-3.3-.7-4.6 0-8.3 3.7-8.3 8.3 0 4 2.9 7.4 6.7 8.2h.2c2.5-.8 7.5-7.5 6.7-11.7-.4-1.5-1-2.9-2-4.1z" + clip-rule="evenodd" /> + <path id="Mullvad_Helmet" fill="#fdd321" fill-rule="evenodd" + d="M667.6 143.8c-1.5-4.1-1.1-9.4 1-14.4 3-6.9 8.7-11.5 14.1-11.5 1.1 0 2.1.2 3.1.6 3.1-2.8 6.7-5.1 10.7-6.7 22.1-8.8 54.4 6.9 62.7 28.6 4 10.5 2.8 22-.6 32.5-2.8 8.6-13 21-9.2 30.4-1.5-.4-33.1-10.2-41.9-15.8-14.1-8.8-26.8-19.6-36.3-28l-.3-.3-32.1-15.2c-.4-.2-.8-.4-1.1-.6 4.6 0 22.1 2.1 29.9.4" + clip-rule="evenodd" /> + <g id="Helmet_Lamp"> + <path id="path113" fill="#fff" + d="M677.1 147.4c-.9 0-1.6-.2-2.3-.5-1.6-.7-2.8-2-3.6-4-1.4-3.4-1-8.1.9-12.5 2.5-5.6 7.3-9.7 11.5-9.7.8 0 1.6.2 2.4.5 2.1.9 3.6 3 4.1 6 .6 3.2.1 6.9-1.5 10.4-2.4 5.7-7.3 9.8-11.5 9.8z" /> + <g id="g117"> + <path id="path115" fill="#1d2a3a" + d="M683.6 122.3c.6 0 1.2.1 1.8.4 1.6.7 2.8 2.5 3.2 4.9.5 2.9.1 6.3-1.4 9.5-2.2 5.1-6.5 8.8-10.1 8.8-.6 0-1.2-.1-1.7-.3-1.5-.6-2.3-2-2.7-3.1-1.2-3-.9-7.4.8-11.4 2.2-5.1 6.5-8.8 10.1-8.8m0-3c-4.8 0-10.1 4.4-12.9 10.7-2.1 4.7-2.4 9.8-.9 13.7.9 2.3 2.4 3.9 4.3 4.8.9.4 1.9.6 3 .6 4.8 0 10.1-4.4 12.8-10.7 1.7-3.8 2.2-7.8 1.6-11.3-.6-3.5-2.4-6-5-7.1-.9-.5-1.9-.7-2.9-.7z" /> + </g> + </g> + </g> +</svg> ===================================== toolkit/components/search/content/mullvadBrowserSearchEngineIcons.json ===================================== @@ -0,0 +1,9 @@ +[ + ["ddg", "chrome://global/content/search/duckduckgo.ico"], + ["ddg-html", "chrome://global/content/search/duckduckgo.ico"], + ["mullvad-leta", "chrome://global/content/search/mullvad-leta.svg"], + ["mojeek", "chrome://global/content/search/mojeek.ico"], + ["brave", "chrome://global/content/search/brave.svg"], + ["startpage", "chrome://global/content/search/startpage.png"], + ["metager", "chrome://global/content/search/metager.ico"] +] ===================================== toolkit/components/search/content/mullvadBrowserSearchEngines.json ===================================== @@ -0,0 +1,114 @@ +[ + { + "aliases": ["duckduckgo", "ddg"], + "name": "DuckDuckGo", + "urls": { + "search": { + "base": "https://duckduckgo.com/", + "params": [], + "searchTermParamName": "q" + } + }, + "id": "04e99a38-13ee-47d8-8aa4-64482b3dea99", + "identifier": "ddg", + "recordType": "engine", + "orderHint": 100, + "variants": [] + }, + { + "aliases": ["ddg-html", "duckduckgohtml", "ddgh"], + "name": "DuckDuckGo (HTML)", + "urls": { + "search": { + "base": "https://html.duckduckgo.com/html/", + "params": [], + "searchTermParamName": "q" + } + }, + "id": "98d8c84b-7455-431d-98b9-890e7bcc0041", + "identifier": "ddg-html", + "recordType": "engine", + "orderHint": 90, + "variants": [] + }, + { + "aliases": ["mullvad-leta", "leta", "mullvad", "ml"], + "name": "Mullvad Leta", + "urls": { + "search": { + "base": "https://leta.mullvad.net/", + "params": [], + "searchTermParamName": "q" + } + }, + "id": "ee88d691-6d7a-4adb-9fec-5a205565505a", + "identifier": "mullvad-leta", + "recordType": "engine", + "orderHint": 80, + "variants": [] + }, + { + "aliases": ["mojeek", "mj"], + "name": "Mojeek", + "urls": { + "search": { + "base": "https://www.mojeek.com/search", + "params": [], + "searchTermParamName": "q" + } + }, + "id": "10df12ac-2b39-4aa9-8845-d5b35d5bb70c", + "identifier": "mojeek", + "recordType": "engine", + "orderHint": 70, + "variants": [] + }, + { + "aliases": ["brave", "bv"], + "name": "Brave Search", + "urls": { + "search": { + "base": "https://search.brave.com/search", + "params": [], + "searchTermParamName": "q" + } + }, + "id": "f479314b-030b-49a8-a2fe-7e1c5d1d9071", + "identifier": "brave", + "recordType": "engine", + "orderHint": 60, + "variants": [] + }, + { + "aliases": ["startpage", "sp"], + "name": "Startpage", + "urls": { + "search": { + "base": "https://www.startpage.com/sp/search", + "params": [], + "searchTermParamName": "q" + } + }, + "id": "049f86fd-28fe-4389-910f-aac28f07d745", + "identifier": "startpage", + "recordType": "engine", + "orderHint": 50, + "variants": [] + }, + { + "aliases": ["metager", "mg"], + "name": "MetaGer", + "urls": { + "search": { + "base": "https://metager.org/meta/meta.ger3", + "params": [], + "searchTermParamName": "eingabe" + } + }, + "id": "a9d07d93-469c-4bf4-8dd1-fa137f1cc85f", + "identifier": "metager", + "recordType": "engine", + "orderHint": 40, + "variants": [] + } +] ===================================== toolkit/components/search/content/startpage.png ===================================== Binary files /dev/null and b/toolkit/components/search/content/startpage.png differ ===================================== toolkit/components/search/jar.mn ===================================== @@ -0,0 +1,6 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +toolkit.jar: + content/global/search/ (content/*) ===================================== toolkit/components/search/moz.build ===================================== @@ -43,5 +43,7 @@ TESTING_JS_MODULES += [ "tests/SearchTestUtils.sys.mjs", ] +JAR_MANIFESTS += ["jar.mn"] + with Files("**"): BUG_COMPONENT = ("Firefox", "Search") View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/0fb… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/0fb… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][main] Bug 41106: Force rebuild of application-services
by Pier Angelo Vendrame (@pierov) 12 Sep '24

12 Sep '24
Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: abe6e299 by Nicolas Vigier at 2024-09-12T10:50:05+02:00 Bug 41106: Force rebuild of application-services As a workaround to avoid a reproducibility issue when application-services has not been rebuilt in a long time. - - - - - 1 changed file: - projects/application-services/config Changes: ===================================== projects/application-services/config ===================================== @@ -16,8 +16,12 @@ var: steps: build: - filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]' + filename: '[% project %]-[% c("version") %]-[% c("var/rebuild_date") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]' var: + # Due to some issue in application-service causing non matching + # builds when build time differ a lot, we need to do periodic rebuilds: + # https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/merge_re… + rebuild_date: '2024-09-12' arch_deps: # Needed to build NSS - gyp View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/a… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/a… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-128.2.0esr-14.0-1] 3 commits: fixup! Bug 42247: Android helpers for the TorProvider
by Pier Angelo Vendrame (@pierov) 11 Sep '24

11 Sep '24
Pier Angelo Vendrame pushed to branch tor-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Tor Browser Commits: 9d554099 by Pier Angelo Vendrame at 2024-09-11T22:29:36+02:00 fixup! Bug 42247: Android helpers for the TorProvider Bug 42628: Remove browser.tor_android.use_new_bootstrap. - - - - - 37d0aa1a by Pier Angelo Vendrame at 2024-09-11T22:29:36+02:00 fixup! [android] Enable the connect assist experiments on alpha Bug 42628: Remove browser.tor_android.use_new_bootstrap. - - - - - 40f8455d by Pier Angelo Vendrame at 2024-09-11T22:29:37+02:00 fixup! Bug 42027: Base Browser migration procedures. Bug 43124: Implement a migration procedure for Android. - - - - - 5 changed files: - mobile/android/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt - mobile/android/android-components/components/concept/engine/src/main/java/mozilla/components/concept/engine/Settings.kt - mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java - mobile/shared/components/geckoview/GeckoViewStartup.sys.mjs - toolkit/modules/TorAndroidIntegration.sys.mjs Changes: ===================================== mobile/android/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt ===================================== @@ -1347,11 +1347,6 @@ class GeckoEngine( localeUpdater.updateValue() } } - override var useNewBootstrap: Boolean - get() = runtime.settings.useNewBootstrap - set(value) { - runtime.settings.useNewBootstrap = value - } }.apply { defaultSettings?.let { this.javascriptEnabled = it.javascriptEnabled @@ -1380,7 +1375,6 @@ class GeckoEngine( this.emailTrackerBlockingPrivateBrowsing = it.emailTrackerBlockingPrivateBrowsing this.torSecurityLevel = it.torSecurityLevel this.spoofEnglish = it.spoofEnglish - this.useNewBootstrap = it.useNewBootstrap } } ===================================== mobile/android/android-components/components/concept/engine/src/main/java/mozilla/components/concept/engine/Settings.kt ===================================== @@ -259,7 +259,6 @@ abstract class Settings { open var spoofEnglish: Boolean by UnsupportedSetting() - open var useNewBootstrap: Boolean by UnsupportedSetting() } /** @@ -312,7 +311,6 @@ data class DefaultSettings( override var emailTrackerBlockingPrivateBrowsing: Boolean = false, override var torSecurityLevel: Int = 4, override var spoofEnglish: Boolean = false, - override var useNewBootstrap: Boolean = true, ) : Settings() class UnsupportedSetting<T> { ===================================== mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java ===================================== @@ -598,11 +598,6 @@ public final class GeckoRuntimeSettings extends RuntimeSettings { getSettings().mSecurityLevel.set(level); return this; } - - public @NonNull Builder useNewBootstrap(final boolean flag) { - getSettings().mUseNewBootstrap.set(flag); - return this; - } } private GeckoRuntime mRuntime; @@ -675,8 +670,6 @@ public final class GeckoRuntimeSettings extends RuntimeSettings { /* package */ final Pref<Integer> mSpoofEnglish = new Pref<>("privacy.spoof_english", 0); /* package */ final Pref<Integer> mSecurityLevel = new Pref<>("browser.security_level.security_slider", 4); - /* package */ final Pref<Boolean> mUseNewBootstrap = - new Pref<>("browser.tor_android.use_new_bootstrap", false); /* package */ int mPreferredColorScheme = COLOR_SCHEME_SYSTEM; @@ -1725,15 +1718,6 @@ public final class GeckoRuntimeSettings extends RuntimeSettings { return this; } - public boolean getUseNewBootstrap() { - return mUseNewBootstrap.get(); - } - - public @NonNull GeckoRuntimeSettings setUseNewBootstrap(final boolean flag) { - mUseNewBootstrap.commit(flag); - return this; - } - @Override // Parcelable public void writeToParcel(final Parcel out, final int flags) { super.writeToParcel(out, flags); ===================================== mobile/shared/components/geckoview/GeckoViewStartup.sys.mjs ===================================== @@ -261,6 +261,8 @@ export class GeckoViewStartup { "GeckoView:InitialForeground", ]); + this.#migratePreferences(); + lazy.TorAndroidIntegration.init(); lazy.TorDomainIsolator.init(); @@ -370,6 +372,50 @@ export class GeckoViewStartup { break; } } + + /** + * This is the equivalent of BrowserGlue._migrateUITBB. + */ + #migratePreferences() { + const MIGRATION_VERSION = 1; + const MIGRATION_PREF = "torbrowser.migration_android.version"; + + // We do not have a way to check for new profiles on Android. + // However, the first version is harmless for new installs, so run it + // anyway. + const currentVersion = Services.prefs.getIntPref(MIGRATION_PREF, 0); + if (currentVersion < 1) { + // First implementation of the migration on Android (tor-browser#43124, + // 14.0a5, September 2024). + const prefToClear = [ + // Old torbutton preferences not used anymore. + // Some of them should have never been set on Android, as on Android we + // force PBM... But who knows about very old profiles. + "browser.cache.disk.enable", + "places.history.enabled", + "security.nocertdb", + "permissions.memory_only", + "extensions.torbutton.loglevel", + "extensions.torbutton.logmethod", + "extensions.torbutton.pref_fixup_version", + "extensions.torbutton.resize_new_windows", + "extensions.torbutton.startup", + "extensions.torlauncher.prompt_for_locale", + "extensions.torlauncher.loglevel", + "extensions.torlauncher.logmethod", + "extensions.torlauncher.torrc_fixup_version", + // tor-browser#42149: Do not change HTTPS-Only settings in the security + // level. + "dom.security.https_only_mode_send_http_background_request", + ]; + for (const pref of prefToClear) { + if (Services.prefs.prefHasUserValue(pref)) { + Services.prefs.clearUserPref(pref); + } + } + } + Services.prefs.setIntPref(MIGRATION_PREF, MIGRATION_VERSION); + } } GeckoViewStartup.prototype.classID = Components.ID( ===================================== toolkit/modules/TorAndroidIntegration.sys.mjs ===================================== @@ -14,7 +14,6 @@ ChromeUtils.defineESModuleGetters(lazy, { }); const Prefs = Object.freeze({ - useNewBootstrap: "browser.tor_android.use_new_bootstrap", logLevel: "browser.tor_android.log_level", }); @@ -49,15 +48,18 @@ const ListenedEvents = Object.freeze({ class TorAndroidIntegrationImpl { #initialized = false; - init() { + async init() { + if (this.#initialized) { + logger.warn("Something tried to initilize us again."); + return; + } + this.#initialized = true; + lazy.EventDispatcher.instance.registerListener( this, Object.values(ListenedEvents) ); - this.#bootstrapMethodReset(); - Services.prefs.addObserver(Prefs.useNewBootstrap, this); - Services.obs.addObserver(this, lazy.TorProviderTopics.TorLog); for (const topic in lazy.TorConnectTopics) { @@ -67,13 +69,6 @@ class TorAndroidIntegrationImpl { for (const topic in lazy.TorSettingsTopics) { Services.obs.addObserver(this, lazy.TorSettingsTopics[topic]); } - } - - async #initNewBootstrap() { - if (this.#initialized) { - return; - } - this.#initialized = true; lazy.TorProviderBuilder.init().finally(() => { lazy.TorProviderBuilder.firstWindowLoaded(); @@ -86,13 +81,8 @@ class TorAndroidIntegrationImpl { } } - observe(subj, topic, data) { + observe(subj, topic) { switch (topic) { - case "nsPref:changed": - if (data === Prefs.useNewBootstrap) { - this.#bootstrapMethodReset(); - } - break; case lazy.TorConnectTopics.StateChange: lazy.EventDispatcher.instance.sendRequest({ type: EmittedEvents.connectStateChanged, @@ -187,15 +177,6 @@ class TorAndroidIntegrationImpl { callback?.onError(e); } } - - #bootstrapMethodReset() { - if (Services.prefs.getBoolPref(Prefs.useNewBootstrap, false)) { - this.#initNewBootstrap(); - } else { - Services.prefs.clearUserPref("network.proxy.socks"); - Services.prefs.clearUserPref("network.proxy.socks_port"); - } - } } export const TorAndroidIntegration = new TorAndroidIntegrationImpl(); View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/4eb9b6… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/4eb9b6… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • ...
  • 25
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.