tbb-commits
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
- 1 participants
- 18605 discussions

[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
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

[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
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'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

[Git][tpo/applications/tor-browser-build][main] Bug 41106: Force rebuild of application-services
by Pier Angelo Vendrame (@pierov) 12 Sep '24
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

[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
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

[Git][tpo/applications/tor-browser][tor-browser-128.2.0esr-14.0-1] fixup! [android] Modify add-on support
by ma1 (@ma1) 11 Sep '24
by ma1 (@ma1) 11 Sep '24
11 Sep '24
ma1 pushed to branch tor-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Tor Browser
Commits:
4eb9b64f by hackademix at 2024-09-11T21:59:25+02:00
fixup! [android] Modify add-on support
Bug 43097: Use default (non-builtin) extension installation method which works with xpi files.
- - - - -
6 changed files:
- mobile/android/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/webextension/GeckoWebExtension.kt
- mobile/android/android-components/components/concept/engine/src/main/java/mozilla/components/concept/engine/webextension/WebExtension.kt
- mobile/android/android-components/components/support/webextensions/src/main/java/mozilla/components/support/webextensions/WebExtensionSupport.kt
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/InstalledAddonDetailsFragment.kt
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/TorBrowserFeatures.kt
- mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebExtensionController.java
Changes:
=====================================
mobile/android/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/webextension/GeckoWebExtension.kt
=====================================
@@ -393,6 +393,7 @@ class GeckoWebExtension(
override fun isAllowedInPrivateBrowsing(): Boolean {
return isBuiltIn() || nativeExtension.metaData.allowedInPrivateBrowsing
+ || isBundled()
}
override suspend fun loadIcon(size: Int): Bitmap? {
=====================================
mobile/android/android-components/components/concept/engine/src/main/java/mozilla/components/concept/engine/webextension/WebExtension.kt
=====================================
@@ -164,6 +164,14 @@ abstract class WebExtension(
*/
open fun isBuiltIn(): Boolean = Uri.parse(url).scheme == "resource"
+ /**
+ * Checks whether or not this extension is bundled with this browser,
+ * but otherwise behaves as an unprivileged (non built-in) extension,
+ * except it cannot be disabled or uninstalled from the UI (e.g.
+ * NoScript in the Tor Browser).
+ */
+ open fun isBundled(): Boolean = id == "{73a6fe31-595d-460b-a920-fcc0f8843232}"
+
/**
* Checks whether or not this extension is enabled.
*/
=====================================
mobile/android/android-components/components/support/webextensions/src/main/java/mozilla/components/support/webextensions/WebExtensionSupport.kt
=====================================
@@ -234,6 +234,7 @@ object WebExtensionSupport {
// when the add-on has already been installed, we don't need to show anything
// either.
val shouldDispatchAction = !installedExtensions.containsKey(extension.id) && !extension.isBuiltIn()
+ && !extension.isBundled()
registerInstalledExtension(store, extension)
if (shouldDispatchAction) {
store.dispatch(
=====================================
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/InstalledAddonDetailsFragment.kt
=====================================
@@ -44,6 +44,8 @@ class InstalledAddonDetailsFragment : Fragment() {
private var _binding: FragmentInstalledAddOnDetailsBinding? = null
+ private var isBundledAddon = false;
+
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
@@ -51,6 +53,7 @@ class InstalledAddonDetailsFragment : Fragment() {
): View {
if (!::addon.isInitialized) {
addon = AddonDetailsFragmentArgs.fromBundle(requireNotNull(arguments)).addon
+ isBundledAddon = installedExtensions[addon.id]?.isBundled() ?: false
}
setBindingAndBindUI(
@@ -148,6 +151,7 @@ class InstalledAddonDetailsFragment : Fragment() {
// When the ad-on is blocklisted or not correctly signed, we do not want to enable the toggle switch
// because users shouldn't be able to re-enable an add-on in this state.
if (
+ isBundledAddon ||
addon.isDisabledAsBlocklisted() ||
addon.isDisabledAsNotCorrectlySigned() ||
addon.isDisabledAsIncompatible()
@@ -303,6 +307,7 @@ class InstalledAddonDetailsFragment : Fragment() {
}
private fun bindReportButton() {
+ binding.reportAddOn.isVisible = !isBundledAddon
binding.reportAddOn.setOnClickListener {
val shouldCreatePrivateSession = (activity as HomeActivity).browsingModeManager.mode.isPrivate
@@ -367,8 +372,7 @@ class InstalledAddonDetailsFragment : Fragment() {
}
private fun bindRemoveButton() {
- val isBuiltin = installedExtensions[addon.id]?.isBuiltIn() ?: false
- binding.removeAddOn.isVisible = !isBuiltin
+ binding.removeAddOn.isVisible = !isBundledAddon
binding.removeAddOn.setOnClickListener {
setAllInteractiveViewsClickable(binding, false)
requireContext().components.addonManager.uninstallAddon(
=====================================
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/TorBrowserFeatures.kt
=====================================
@@ -6,12 +6,14 @@
package org.mozilla.fenix.components
+import android.os.StrictMode
import android.content.Context
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
+import java.io.IOException
import mozilla.components.concept.engine.webextension.WebExtension
import mozilla.components.concept.engine.webextension.WebExtensionRuntime
import mozilla.components.support.webextensions.WebExtensionSupport
@@ -25,14 +27,39 @@ object TorBrowserFeatures {
private const val NOSCRIPT_ID = "{73a6fe31-595d-460b-a920-fcc0f8843232}"
private fun installNoScript(
+ context: Context,
runtime: WebExtensionRuntime,
onSuccess: ((WebExtension) -> Unit),
onError: ((Throwable) -> Unit)
) {
+ /**
+ * Copy the xpi from assets to cacheDir, we do not care if the file is later deleted.
+ */
+ val xpiName = "$NOSCRIPT_ID.xpi"
+ val addonPath = context.cacheDir.resolve(xpiName)
+ val policy = StrictMode.getThreadPolicy()
+ try {
+ context.assets.open("extensions/$xpiName")
+ .use { inStream ->
+ // we don't want penaltyDeath() on disk write
+ StrictMode.setThreadPolicy(StrictMode.ThreadPolicy.LAX)
- runtime.installBuiltInWebExtension(
- id = NOSCRIPT_ID,
- url = "resource://android/assets/extensions/" + NOSCRIPT_ID + ".xpi",
+ addonPath.outputStream().use { outStream ->
+ inStream.copyTo(outStream)
+ }
+ }
+ } catch (throwable: IOException) {
+ onError(throwable)
+ return
+ } finally {
+ StrictMode.setThreadPolicy(policy)
+ }
+
+ /**
+ * Install with a file:// URI pointing to the temp location where the addon was copied to.
+ */
+ runtime.installWebExtension(
+ url = addonPath.toURI().toString(),
onSuccess = { extension ->
runtime.setAllowedInPrivateBrowsing(
extension,
@@ -95,6 +122,7 @@ object TorBrowserFeatures {
*/
if (!settings.noscriptInstalled) {
installNoScript(
+ context,
runtime,
onSuccess = {
settings.noscriptInstalled = true
=====================================
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebExtensionController.java
=====================================
@@ -1166,6 +1166,27 @@ public class WebExtensionController {
});
}
+ private boolean isBundledExtension(final String extensionId) {
+ return "{73a6fe31-595d-460b-a920-fcc0f8843232}".equals(extensionId);
+ }
+
+ private boolean promptBypass(final WebExtension extension, final EventCallback callback) {
+ // allow bundled extensions, e.g. NoScript, to be installed with no prompt
+ if (isBundledExtension(extension.id)) {
+ callback.resolveTo(
+ GeckoResult.allow().map(
+ allowOrDeny -> {
+ final GeckoBundle response = new GeckoBundle(1);
+ response.putBoolean("allow", true);
+ return response;
+ }
+ )
+ );
+ return true;
+ }
+ return false;
+ }
+
private void installPrompt(final GeckoBundle message, final EventCallback callback) {
final GeckoBundle extensionBundle = message.getBundle("extension");
if (extensionBundle == null
@@ -1181,6 +1202,10 @@ public class WebExtensionController {
final WebExtension extension = new WebExtension(mDelegateControllerProvider, extensionBundle);
+ if (promptBypass(extension, callback)) {
+ return;
+ }
+
if (mPromptDelegate == null) {
Log.e(
LOGTAG, "Tried to install extension " + extension.id + " but no delegate is registered");
@@ -1220,6 +1245,10 @@ public class WebExtensionController {
final WebExtension currentExtension =
new WebExtension(mDelegateControllerProvider, currentBundle);
+ if (promptBypass(currentExtension, callback)) {
+ return;
+ }
+
final WebExtension updatedExtension =
new WebExtension(mDelegateControllerProvider, updatedBundle);
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/4eb9b64…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/4eb9b64…
You're receiving this email because of your account on gitlab.torproject.org.
1
0

[Git][tpo/applications/tor-browser][base-browser-128.2.0esr-14.0-1] 2 commits: fixup! Firefox preference overrides.
by Pier Angelo Vendrame (@pierov) 11 Sep '24
by Pier Angelo Vendrame (@pierov) 11 Sep '24
11 Sep '24
Pier Angelo Vendrame pushed to branch base-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Tor Browser
Commits:
28593074 by Henry Wilkes at 2024-09-11T11:49:11+02:00
fixup! Firefox preference overrides.
Bug 42653: Hide neterror reporting checkbox.
- - - - -
cb7cdb5f by Henry Wilkes at 2024-09-11T11:49:14+02:00
fixup! Bug 42027: Base Browser migration procedures.
Bug 42653: Reset security.xfocsp.errorReporting.automatic.
- - - - -
2 changed files:
- browser/app/profile/001-base-profile.js
- browser/components/BrowserGlue.sys.mjs
Changes:
=====================================
browser/app/profile/001-base-profile.js
=====================================
@@ -212,6 +212,9 @@ pref("browser.tabs.crashReporting.sendReport", false);
pref("browser.crashReports.unsubmittedCheck.autoSubmit2", false);
// Added in tor-browser#41496 even though false by default
pref("browser.crashReports.unsubmittedCheck.enabled", false);
+// Disable checkbox in about:neterror that controls
+// security.xfocsp.errorReporting.automatic. See tor-browser#42653.
+pref("security.xfocsp.errorReporting.enabled", false);
// Added in tor-browser#41496 even though it shuld be already always disabled
// since we disable MOZ_CRASHREPORTER.
pref("breakpad.reportURL", "data:");
=====================================
browser/components/BrowserGlue.sys.mjs
=====================================
@@ -4701,11 +4701,13 @@ BrowserGlue.prototype = {
_migrateUIBB() {
// Version 1: 13.0a3. Reset layout.css.prefers-color-scheme.content-override
// for tor-browser#41739.
- // Version 2: 14.0a5:Reset the privacy tracking headers preferences since
+ // Version 2: 14.0a5: Reset the privacy tracking headers preferences since
// the UI is hidden. tor-browser#42777.
// Also, do not set
// dom.security.https_only_mode_send_http_background_request in
// the security level anymore (tor-browser#42149).
+ // Also, reset security.xfocsp.errorReporting.automatic since we
+ // hid its neterror checkbox. tor-browser#42653.
const MIGRATION_VERSION = 2;
const MIGRATION_PREF = "basebrowser.migration.version";
// We do not care whether this is a new or old profile, since in version 1
@@ -4725,10 +4727,11 @@ BrowserGlue.prototype = {
"privacy.donottrackheader.enabled",
// Telemetry preference for if the user changed the value.
"privacy.globalprivacycontrol.was_ever_enabled",
- // The last two preferences have no corresponding UI, but are related.
+ // The next two preferences have no corresponding UI, but are related.
"privacy.globalprivacycontrol.functionality.enabled",
"privacy.globalprivacycontrol.pbmode.enabled",
"dom.security.https_only_mode_send_http_background_request",
+ "security.xfocsp.errorReporting.automatic",
]) {
Services.prefs.clearUserPref(prefName);
}
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/eda499…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/eda499…
You're receiving this email because of your account on gitlab.torproject.org.
1
0

[Git][tpo/applications/mullvad-browser][mullvad-browser-128.2.0esr-14.0-1] 2 commits: fixup! Firefox preference overrides.
by Pier Angelo Vendrame (@pierov) 11 Sep '24
by Pier Angelo Vendrame (@pierov) 11 Sep '24
11 Sep '24
Pier Angelo Vendrame pushed to branch mullvad-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Mullvad Browser
Commits:
7f62dab3 by Henry Wilkes at 2024-09-11T11:49:25+02:00
fixup! Firefox preference overrides.
Bug 42653: Hide neterror reporting checkbox.
- - - - -
58b09ef5 by Henry Wilkes at 2024-09-11T11:49:26+02:00
fixup! Bug 42027: Base Browser migration procedures.
Bug 42653: Reset security.xfocsp.errorReporting.automatic.
- - - - -
2 changed files:
- browser/app/profile/001-base-profile.js
- browser/components/BrowserGlue.sys.mjs
Changes:
=====================================
browser/app/profile/001-base-profile.js
=====================================
@@ -212,6 +212,9 @@ pref("browser.tabs.crashReporting.sendReport", false);
pref("browser.crashReports.unsubmittedCheck.autoSubmit2", false);
// Added in tor-browser#41496 even though false by default
pref("browser.crashReports.unsubmittedCheck.enabled", false);
+// Disable checkbox in about:neterror that controls
+// security.xfocsp.errorReporting.automatic. See tor-browser#42653.
+pref("security.xfocsp.errorReporting.enabled", false);
// Added in tor-browser#41496 even though it shuld be already always disabled
// since we disable MOZ_CRASHREPORTER.
pref("breakpad.reportURL", "data:");
=====================================
browser/components/BrowserGlue.sys.mjs
=====================================
@@ -4683,11 +4683,13 @@ BrowserGlue.prototype = {
_migrateUIBB() {
// Version 1: 13.0a3. Reset layout.css.prefers-color-scheme.content-override
// for tor-browser#41739.
- // Version 2: 14.0a5:Reset the privacy tracking headers preferences since
+ // Version 2: 14.0a5: Reset the privacy tracking headers preferences since
// the UI is hidden. tor-browser#42777.
// Also, do not set
// dom.security.https_only_mode_send_http_background_request in
// the security level anymore (tor-browser#42149).
+ // Also, reset security.xfocsp.errorReporting.automatic since we
+ // hid its neterror checkbox. tor-browser#42653.
const MIGRATION_VERSION = 2;
const MIGRATION_PREF = "basebrowser.migration.version";
// We do not care whether this is a new or old profile, since in version 1
@@ -4707,10 +4709,11 @@ BrowserGlue.prototype = {
"privacy.donottrackheader.enabled",
// Telemetry preference for if the user changed the value.
"privacy.globalprivacycontrol.was_ever_enabled",
- // The last two preferences have no corresponding UI, but are related.
+ // The next two preferences have no corresponding UI, but are related.
"privacy.globalprivacycontrol.functionality.enabled",
"privacy.globalprivacycontrol.pbmode.enabled",
"dom.security.https_only_mode_send_http_background_request",
+ "security.xfocsp.errorReporting.automatic",
]) {
Services.prefs.clearUserPref(prefName);
}
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/e5…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/e5…
You're receiving this email because of your account on gitlab.torproject.org.
1
0

[Git][tpo/applications/tor-browser][tor-browser-128.2.0esr-14.0-1] 2 commits: fixup! Firefox preference overrides.
by Pier Angelo Vendrame (@pierov) 11 Sep '24
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:
7fa115dd by Henry Wilkes at 2024-09-11T10:10:49+01:00
fixup! Firefox preference overrides.
Bug 42653: Hide neterror reporting checkbox.
- - - - -
24265a33 by Henry Wilkes at 2024-09-11T10:11:22+01:00
fixup! Bug 42027: Base Browser migration procedures.
Bug 42653: Reset security.xfocsp.errorReporting.automatic.
- - - - -
2 changed files:
- browser/app/profile/001-base-profile.js
- browser/components/BrowserGlue.sys.mjs
Changes:
=====================================
browser/app/profile/001-base-profile.js
=====================================
@@ -212,6 +212,9 @@ pref("browser.tabs.crashReporting.sendReport", false);
pref("browser.crashReports.unsubmittedCheck.autoSubmit2", false);
// Added in tor-browser#41496 even though false by default
pref("browser.crashReports.unsubmittedCheck.enabled", false);
+// Disable checkbox in about:neterror that controls
+// security.xfocsp.errorReporting.automatic. See tor-browser#42653.
+pref("security.xfocsp.errorReporting.enabled", false);
// Added in tor-browser#41496 even though it shuld be already always disabled
// since we disable MOZ_CRASHREPORTER.
pref("breakpad.reportURL", "data:");
=====================================
browser/components/BrowserGlue.sys.mjs
=====================================
@@ -4812,11 +4812,13 @@ BrowserGlue.prototype = {
_migrateUIBB() {
// Version 1: 13.0a3. Reset layout.css.prefers-color-scheme.content-override
// for tor-browser#41739.
- // Version 2: 14.0a5:Reset the privacy tracking headers preferences since
+ // Version 2: 14.0a5: Reset the privacy tracking headers preferences since
// the UI is hidden. tor-browser#42777.
// Also, do not set
// dom.security.https_only_mode_send_http_background_request in
// the security level anymore (tor-browser#42149).
+ // Also, reset security.xfocsp.errorReporting.automatic since we
+ // hid its neterror checkbox. tor-browser#42653.
const MIGRATION_VERSION = 2;
const MIGRATION_PREF = "basebrowser.migration.version";
// We do not care whether this is a new or old profile, since in version 1
@@ -4836,10 +4838,11 @@ BrowserGlue.prototype = {
"privacy.donottrackheader.enabled",
// Telemetry preference for if the user changed the value.
"privacy.globalprivacycontrol.was_ever_enabled",
- // The last two preferences have no corresponding UI, but are related.
+ // The next two preferences have no corresponding UI, but are related.
"privacy.globalprivacycontrol.functionality.enabled",
"privacy.globalprivacycontrol.pbmode.enabled",
"dom.security.https_only_mode_send_http_background_request",
+ "security.xfocsp.errorReporting.automatic",
]) {
Services.prefs.clearUserPref(prefName);
}
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/f5f0ab…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/f5f0ab…
You're receiving this email because of your account on gitlab.torproject.org.
1
0

[Git][tpo/applications/tor-browser][base-browser-128.2.0esr-14.0-1] 7 commits: fixup! Bug 18905: Hide unwanted items from help menu
by Pier Angelo Vendrame (@pierov) 11 Sep '24
by Pier Angelo Vendrame (@pierov) 11 Sep '24
11 Sep '24
Pier Angelo Vendrame pushed to branch base-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Tor Browser
Commits:
7d140e5c by Henry Wilkes at 2024-09-11T09:32:40+02:00
fixup! Bug 18905: Hide unwanted items from help menu
Bug 42647: Hide the switch device menu item.
- - - - -
32c87a46 by Henry Wilkes at 2024-09-11T09:32:49+02:00
fixup! Firefox preference overrides.
Bug 42647: Remove unused preference
browser.device-migration.help-menu.hidden.
- - - - -
c5fdc06a by Henry Wilkes at 2024-09-11T09:32:58+02:00
Bug 43109: Hide Firefox Relay from settings.
This should remain disabled, see tor-browser#42814.
- - - - -
00bb7583 by Henry Wilkes at 2024-09-11T09:33:07+02:00
fixup! Bug 42027: Base Browser migration procedures.
Bug 42777: Clear user preferences for GPC and DNT.
- - - - -
542ca8e7 by Henry Wilkes at 2024-09-11T09:33:22+02:00
Bug 42777: Hide Website Privacy Preferences.
We hide the Website Privacy Preferences section, which controls the
"global privacy control" (GPC) and "do not track" (DNT) settings.
- - - - -
b987575b by Pier Angelo Vendrame at 2024-09-11T09:33:33+02:00
fixup! Bug 40925: Implemented the Security Level component
Bug 42149: Do not change HTTPS-Only settings in the security level
anymore.
That preference does not really belong to the security level.
- - - - -
eda499b9 by Pier Angelo Vendrame at 2024-09-11T09:33:39+02:00
fixup! Bug 42027: Base Browser migration procedures.
Bug 42149: Clear user values for
https_only_mode_send_http_background_request since we do not change it
with the security level anymore.
- - - - -
6 changed files:
- browser/app/profile/001-base-profile.js
- browser/base/content/browser-menubar.inc
- browser/components/BrowserGlue.sys.mjs
- browser/components/preferences/privacy.inc.xhtml
- browser/components/preferences/privacy.js
- toolkit/components/securitylevel/SecurityLevel.sys.mjs
Changes:
=====================================
browser/app/profile/001-base-profile.js
=====================================
@@ -20,9 +20,6 @@ pref("browser.aboutwelcome.enabled", false);
// Disable the Firefox View tab (tor-browser#41876)
pref("browser.tabs.firefox-view", false, locked);
-// Disable 'Switching to a new device" help menu item (tor-browser#41774)
-pref("browser.device-migration.help-menu.hidden", true);
-
#if MOZ_UPDATE_CHANNEL == release
// tor-browser#42640: Disable Firefox Flame buttond due to unknown interactions with New Identity
pref("browser.privatebrowsing.resetPBM.enabled", false, locked);
=====================================
browser/base/content/browser-menubar.inc
=====================================
@@ -503,6 +503,7 @@
hidden="true"/>
<menuitem id="helpSwitchDevice"
oncommand="openSwitchingDevicesPage();"
+ hidden="true"
data-l10n-id="menu-help-switch-device"
appmenu-data-l10n-id="appmenu-help-switch-device"/>
<menuseparator id="aboutSeparator"/>
=====================================
browser/components/BrowserGlue.sys.mjs
=====================================
@@ -4701,7 +4701,12 @@ BrowserGlue.prototype = {
_migrateUIBB() {
// Version 1: 13.0a3. Reset layout.css.prefers-color-scheme.content-override
// for tor-browser#41739.
- const MIGRATION_VERSION = 1;
+ // Version 2: 14.0a5:Reset the privacy tracking headers preferences since
+ // the UI is hidden. tor-browser#42777.
+ // Also, do not set
+ // dom.security.https_only_mode_send_http_background_request in
+ // the security level anymore (tor-browser#42149).
+ const MIGRATION_VERSION = 2;
const MIGRATION_PREF = "basebrowser.migration.version";
// We do not care whether this is a new or old profile, since in version 1
// we just quickly clear a user preference, which should not do anything to
@@ -4714,6 +4719,20 @@ BrowserGlue.prototype = {
"layout.css.prefers-color-scheme.content-override"
);
}
+ if (currentVersion < 2) {
+ for (const prefName of [
+ "privacy.globalprivacycontrol.enabled",
+ "privacy.donottrackheader.enabled",
+ // Telemetry preference for if the user changed the value.
+ "privacy.globalprivacycontrol.was_ever_enabled",
+ // The last two preferences have no corresponding UI, but are related.
+ "privacy.globalprivacycontrol.functionality.enabled",
+ "privacy.globalprivacycontrol.pbmode.enabled",
+ "dom.security.https_only_mode_send_http_background_request",
+ ]) {
+ Services.prefs.clearUserPref(prefName);
+ }
+ }
Services.prefs.setIntPref(MIGRATION_PREF, MIGRATION_VERSION);
},
=====================================
browser/components/preferences/privacy.inc.xhtml
=====================================
@@ -358,7 +358,7 @@
</vbox>
</vbox>
</groupbox>
-<groupbox id="nonTechnicalPrivacyGroup" data-category="panePrivacy" data-subcategory="nontechnicalprivacy" hidden="true">
+<groupbox id="nonTechnicalPrivacyGroup" data-category="panePrivacy" data-subcategory="nontechnicalprivacy" data-hidden-from-search="true" hidden="true">
<label id="nonTechnicalPrivacyHeader"><html:h2 data-l10n-id="non-technical-privacy-header"/></label>
<vbox id="nonTechnicalPrivacyBox">
<hbox id="globalPrivacyControlBox" flex="1" align="center" hidden="true">
=====================================
browser/components/preferences/privacy.js
=====================================
@@ -3039,8 +3039,12 @@ var gPrivacyPane = {
},
_updateRelayIntegrationUI() {
- document.getElementById("relayIntegrationBox").hidden =
- !FirefoxRelay.isAvailable;
+ // In Base Browser, we always hide the integration checkbox since
+ // FirefoxRelay should remain disabled.
+ // See tor-browser#43109 and tor-browser#42814.
+ // NOTE: FirefoxRelay.isAvailable will be true whenever
+ // FirefoxRelay.isDisabled is true.
+ document.getElementById("relayIntegrationBox").hidden = true;
document.getElementById("relayIntegration").checked =
FirefoxRelay.isAvailable && !FirefoxRelay.isDisabled;
},
=====================================
toolkit/components/securitylevel/SecurityLevel.sys.mjs
=====================================
@@ -256,17 +256,16 @@ var initializeNoScriptControl = () => {
/* eslint-disable */
// prettier-ignore
const kSecuritySettings = {
- // Preference name : [0, 1-high 2-m 3-m 4-low]
- "javascript.options.ion" : [, false, false, false, true ],
- "javascript.options.baselinejit" : [, false, false, false, true ],
- "javascript.options.native_regexp" : [, false, false, false, true ],
- "mathml.disabled" : [, true, true, true, false],
- "gfx.font_rendering.graphite.enabled" : [, false, false, false, true ],
- "gfx.font_rendering.opentype_svg.enabled" : [, false, false, false, true ],
- "svg.disabled" : [, true, false, false, false],
- "javascript.options.asmjs" : [, false, false, false, true ],
- "javascript.options.wasm" : [, false, false, false, true ],
- "dom.security.https_only_mode_send_http_background_request" : [, false, false, false, true ],
+ // Preference name: [0, 1-high 2-m 3-m 4-low]
+ "javascript.options.ion": [, false, false, false, true ],
+ "javascript.options.baselinejit": [, false, false, false, true ],
+ "javascript.options.native_regexp": [, false, false, false, true ],
+ "mathml.disabled": [, true, true, true, false],
+ "gfx.font_rendering.graphite.enabled": [, false, false, false, true ],
+ "gfx.font_rendering.opentype_svg.enabled": [, false, false, false, true ],
+ "svg.disabled": [, true, false, false, false],
+ "javascript.options.asmjs": [, false, false, false, true ],
+ "javascript.options.wasm": [, false, false, false, true ],
};
/* eslint-enable */
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/69a7c0…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/69a7c0…
You're receiving this email because of your account on gitlab.torproject.org.
1
0

[Git][tpo/applications/mullvad-browser][mullvad-browser-128.2.0esr-14.0-1] 7 commits: fixup! Bug 18905: Hide unwanted items from help menu
by Pier Angelo Vendrame (@pierov) 11 Sep '24
by Pier Angelo Vendrame (@pierov) 11 Sep '24
11 Sep '24
Pier Angelo Vendrame pushed to branch mullvad-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Mullvad Browser
Commits:
121e0977 by Henry Wilkes at 2024-09-11T09:34:11+02:00
fixup! Bug 18905: Hide unwanted items from help menu
Bug 42647: Hide the switch device menu item.
- - - - -
8af90aaa by Henry Wilkes at 2024-09-11T09:34:13+02:00
fixup! Firefox preference overrides.
Bug 42647: Remove unused preference
browser.device-migration.help-menu.hidden.
- - - - -
8479f2af by Henry Wilkes at 2024-09-11T09:34:13+02:00
Bug 43109: Hide Firefox Relay from settings.
This should remain disabled, see tor-browser#42814.
- - - - -
509487d7 by Henry Wilkes at 2024-09-11T09:34:13+02:00
fixup! Bug 42027: Base Browser migration procedures.
Bug 42777: Clear user preferences for GPC and DNT.
- - - - -
17e5d5c3 by Henry Wilkes at 2024-09-11T09:34:14+02:00
Bug 42777: Hide Website Privacy Preferences.
We hide the Website Privacy Preferences section, which controls the
"global privacy control" (GPC) and "do not track" (DNT) settings.
- - - - -
1e2a4e09 by Pier Angelo Vendrame at 2024-09-11T09:34:14+02:00
fixup! Bug 40925: Implemented the Security Level component
Bug 42149: Do not change HTTPS-Only settings in the security level
anymore.
That preference does not really belong to the security level.
- - - - -
e5b3573b by Pier Angelo Vendrame at 2024-09-11T09:34:15+02:00
fixup! Bug 42027: Base Browser migration procedures.
Bug 42149: Clear user values for
https_only_mode_send_http_background_request since we do not change it
with the security level anymore.
- - - - -
6 changed files:
- browser/app/profile/001-base-profile.js
- browser/base/content/browser-menubar.inc
- browser/components/BrowserGlue.sys.mjs
- browser/components/preferences/privacy.inc.xhtml
- browser/components/preferences/privacy.js
- toolkit/components/securitylevel/SecurityLevel.sys.mjs
Changes:
=====================================
browser/app/profile/001-base-profile.js
=====================================
@@ -20,9 +20,6 @@ pref("browser.aboutwelcome.enabled", false);
// Disable the Firefox View tab (tor-browser#41876)
pref("browser.tabs.firefox-view", false, locked);
-// Disable 'Switching to a new device" help menu item (tor-browser#41774)
-pref("browser.device-migration.help-menu.hidden", true);
-
#if MOZ_UPDATE_CHANNEL == release
// tor-browser#42640: Disable Firefox Flame buttond due to unknown interactions with New Identity
pref("browser.privatebrowsing.resetPBM.enabled", false, locked);
=====================================
browser/base/content/browser-menubar.inc
=====================================
@@ -502,6 +502,7 @@
hidden="true"/>
<menuitem id="helpSwitchDevice"
oncommand="openSwitchingDevicesPage();"
+ hidden="true"
data-l10n-id="menu-help-switch-device"
appmenu-data-l10n-id="appmenu-help-switch-device"/>
<menuseparator id="aboutSeparator"/>
=====================================
browser/components/BrowserGlue.sys.mjs
=====================================
@@ -4683,7 +4683,12 @@ BrowserGlue.prototype = {
_migrateUIBB() {
// Version 1: 13.0a3. Reset layout.css.prefers-color-scheme.content-override
// for tor-browser#41739.
- const MIGRATION_VERSION = 1;
+ // Version 2: 14.0a5:Reset the privacy tracking headers preferences since
+ // the UI is hidden. tor-browser#42777.
+ // Also, do not set
+ // dom.security.https_only_mode_send_http_background_request in
+ // the security level anymore (tor-browser#42149).
+ const MIGRATION_VERSION = 2;
const MIGRATION_PREF = "basebrowser.migration.version";
// We do not care whether this is a new or old profile, since in version 1
// we just quickly clear a user preference, which should not do anything to
@@ -4696,6 +4701,20 @@ BrowserGlue.prototype = {
"layout.css.prefers-color-scheme.content-override"
);
}
+ if (currentVersion < 2) {
+ for (const prefName of [
+ "privacy.globalprivacycontrol.enabled",
+ "privacy.donottrackheader.enabled",
+ // Telemetry preference for if the user changed the value.
+ "privacy.globalprivacycontrol.was_ever_enabled",
+ // The last two preferences have no corresponding UI, but are related.
+ "privacy.globalprivacycontrol.functionality.enabled",
+ "privacy.globalprivacycontrol.pbmode.enabled",
+ "dom.security.https_only_mode_send_http_background_request",
+ ]) {
+ Services.prefs.clearUserPref(prefName);
+ }
+ }
Services.prefs.setIntPref(MIGRATION_PREF, MIGRATION_VERSION);
},
=====================================
browser/components/preferences/privacy.inc.xhtml
=====================================
@@ -358,7 +358,7 @@
</vbox>
</vbox>
</groupbox>
-<groupbox id="nonTechnicalPrivacyGroup" data-category="panePrivacy" data-subcategory="nontechnicalprivacy" hidden="true">
+<groupbox id="nonTechnicalPrivacyGroup" data-category="panePrivacy" data-subcategory="nontechnicalprivacy" data-hidden-from-search="true" hidden="true">
<label id="nonTechnicalPrivacyHeader"><html:h2 data-l10n-id="non-technical-privacy-header"/></label>
<vbox id="nonTechnicalPrivacyBox">
<hbox id="globalPrivacyControlBox" flex="1" align="center" hidden="true">
=====================================
browser/components/preferences/privacy.js
=====================================
@@ -3041,8 +3041,12 @@ var gPrivacyPane = {
},
_updateRelayIntegrationUI() {
- document.getElementById("relayIntegrationBox").hidden =
- !FirefoxRelay.isAvailable;
+ // In Base Browser, we always hide the integration checkbox since
+ // FirefoxRelay should remain disabled.
+ // See tor-browser#43109 and tor-browser#42814.
+ // NOTE: FirefoxRelay.isAvailable will be true whenever
+ // FirefoxRelay.isDisabled is true.
+ document.getElementById("relayIntegrationBox").hidden = true;
document.getElementById("relayIntegration").checked =
FirefoxRelay.isAvailable && !FirefoxRelay.isDisabled;
},
=====================================
toolkit/components/securitylevel/SecurityLevel.sys.mjs
=====================================
@@ -268,17 +268,16 @@ var initializeNoScriptControl = () => {
/* eslint-disable */
// prettier-ignore
const kSecuritySettings = {
- // Preference name : [0, 1-high 2-m 3-m 4-low]
- "javascript.options.ion" : [, false, false, false, true ],
- "javascript.options.baselinejit" : [, false, false, false, true ],
- "javascript.options.native_regexp" : [, false, false, false, true ],
- "mathml.disabled" : [, true, true, true, false],
- "gfx.font_rendering.graphite.enabled" : [, false, false, false, true ],
- "gfx.font_rendering.opentype_svg.enabled" : [, false, false, false, true ],
- "svg.disabled" : [, true, false, false, false],
- "javascript.options.asmjs" : [, false, false, false, true ],
- "javascript.options.wasm" : [, false, false, false, true ],
- "dom.security.https_only_mode_send_http_background_request" : [, false, false, false, true ],
+ // Preference name: [0, 1-high 2-m 3-m 4-low]
+ "javascript.options.ion": [, false, false, false, true ],
+ "javascript.options.baselinejit": [, false, false, false, true ],
+ "javascript.options.native_regexp": [, false, false, false, true ],
+ "mathml.disabled": [, true, true, true, false],
+ "gfx.font_rendering.graphite.enabled": [, false, false, false, true ],
+ "gfx.font_rendering.opentype_svg.enabled": [, false, false, false, true ],
+ "svg.disabled": [, true, false, false, false],
+ "javascript.options.asmjs": [, false, false, false, true ],
+ "javascript.options.wasm": [, false, false, false, true ],
};
/* eslint-enable */
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/a9…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/a9…
You're receiving this email because of your account on gitlab.torproject.org.
1
0