Commits:
-
0a786687
by Henry Wilkes at 2026-05-06T12:22:31+01:00
fixup! BB 42583: Modify moz-support-link for Base Browser.
BB 44903: Use upstream's `support-page` rather than custom `tor-manual-page`.
-
470aceec
by Henry Wilkes at 2026-05-06T12:22:32+01:00
fixup! BB 41916: Letterboxing preferences UI
BB 44903: Use upstream's `support-page` rather than custom `tor-manual-page`.
-
6ebb1d50
by Henry Wilkes at 2026-05-06T12:22:33+01:00
fixup! BB 40925: Implemented the Security Level component
BB 44903: Use upstream's `support-page` rather than custom `tor-manual-page`.
-
386c008a
by Henry Wilkes at 2026-05-06T12:25:39+01:00
fixup! TB 30237: Add v3 onion services client authentication prompt
TB 44904: Use setting config for onion site settings.
-
d0ffd3d5
by Henry Wilkes at 2026-05-06T12:25:43+01:00
fixup! Tor Browser strings
TB 44904: Merge the onion site settings strings.
-
595177b2
by Henry Wilkes at 2026-05-06T12:25:43+01:00
fixup! Tor Browser localization migration scripts.
TB 44904: Migrate onion sites setting strings.
11 changed files:
Changes:
browser/components/onionservices/content/authPreferences.inc.xhtml
deleted
|
1
|
|
-# Copyright (c) 2020, The Tor Project, Inc.
|
|
2
|
|
-
|
|
3
|
|
-<groupbox id="torOnionServiceKeys" orient="vertical"
|
|
4
|
|
- data-category="panePrivacy" hidden="true">
|
|
5
|
|
- <label><html:h2
|
|
6
|
|
- data-l10n-id="onion-site-authentication-preferences-heading"
|
|
7
|
|
- ></html:h2></label>
|
|
8
|
|
- <hbox>
|
|
9
|
|
- <description
|
|
10
|
|
- class="description-deemphasized description-with-side-element"
|
|
11
|
|
- flex="1"
|
|
12
|
|
- >
|
|
13
|
|
- <html:span
|
|
14
|
|
- id="torOnionServiceKeys-overview"
|
|
15
|
|
- data-l10n-id="onion-site-authentication-preferences-overview"
|
|
16
|
|
- ></html:span>
|
|
17
|
|
- <label
|
|
18
|
|
- id="torOnionServiceKeys-learnMore"
|
|
19
|
|
- class="learnMore text-link"
|
|
20
|
|
- is="text-link"
|
|
21
|
|
- href="">"about:manual#onion-services_onion-service-authentication"
|
|
22
|
|
- useoriginprincipal="true"
|
|
23
|
|
- data-l10n-id="onion-site-authentication-preferences-learn-more"
|
|
24
|
|
- />
|
|
25
|
|
- </description>
|
|
26
|
|
- <vbox align="end">
|
|
27
|
|
- <html:button
|
|
28
|
|
- id="torOnionServiceKeys-savedKeys"
|
|
29
|
|
- class="accessory-button"
|
|
30
|
|
- data-l10n-id="onion-site-authentication-preferences-saved-keys-button"
|
|
31
|
|
- ></html:button>
|
|
32
|
|
- </vbox>
|
|
33
|
|
- </hbox>
|
|
34
|
|
-</groupbox> |
browser/components/onionservices/content/authPreferences.js
deleted
|
1
|
|
-// Copyright (c) 2020, The Tor Project, Inc.
|
|
2
|
|
-
|
|
3
|
|
-"use strict";
|
|
4
|
|
-
|
|
5
|
|
-/* import-globals-from /browser/components/preferences/preferences.js */
|
|
6
|
|
-
|
|
7
|
|
-/**
|
|
8
|
|
- * Onion site preferences.
|
|
9
|
|
- */
|
|
10
|
|
-var OnionServicesAuthPreferences = {
|
|
11
|
|
- init() {
|
|
12
|
|
- document
|
|
13
|
|
- .getElementById("torOnionServiceKeys-savedKeys")
|
|
14
|
|
- .addEventListener("click", () => {
|
|
15
|
|
- gSubDialog.open(
|
|
16
|
|
- "chrome://browser/content/onionservices/savedKeysDialog.xhtml"
|
|
17
|
|
- );
|
|
18
|
|
- });
|
|
19
|
|
- },
|
|
20
|
|
-}; |
browser/components/preferences/letterboxing.inc.xhtml
| ... |
... |
@@ -10,7 +10,7 @@ |
|
10
|
10
|
<html:span data-l10n-id="letterboxing-overview"></html:span>
|
|
11
|
11
|
<html:a
|
|
12
|
12
|
is="moz-support-link"
|
|
13
|
|
- tor-manual-page="anti-fingerprinting_letterboxing"
|
|
|
13
|
+ support-page="tor-manual:anti-fingerprinting_letterboxing"
|
|
14
|
14
|
data-l10n-id="letterboxing-learn-more"
|
|
15
|
15
|
></html:a>
|
|
16
|
16
|
</description>
|
browser/components/preferences/main.js
| ... |
... |
@@ -3868,6 +3868,18 @@ SettingGroupManager.registerGroups({ |
|
3868
|
3868
|
},
|
|
3869
|
3869
|
],
|
|
3870
|
3870
|
},
|
|
|
3871
|
+ onionSiteAuthentication: {
|
|
|
3872
|
+ l10nId: "onion-site-authentication-group",
|
|
|
3873
|
+ headingLevel: 2,
|
|
|
3874
|
+ supportPage: "tor-manual:onion-services_onion-service-authentication",
|
|
|
3875
|
+ items: [
|
|
|
3876
|
+ {
|
|
|
3877
|
+ id: "onionSiteSavedKeys",
|
|
|
3878
|
+ control: "moz-box-button",
|
|
|
3879
|
+ l10nId: "onion-site-authentication-saved-keys-button",
|
|
|
3880
|
+ },
|
|
|
3881
|
+ ],
|
|
|
3882
|
+ },
|
|
3871
|
3883
|
// Hide the payments and addresses settings. tor-browser#44460.
|
|
3872
|
3884
|
// NOTE: "payments" and "addresses" are usually configured in
|
|
3873
|
3885
|
// FormAutofillPreferences.sys.mjs. But this never runs because the "autofill"
|
browser/components/preferences/privacy.inc.xhtml
| ... |
... |
@@ -553,7 +553,7 @@ |
|
553
|
553
|
|
|
554
|
554
|
<html:setting-group groupid="passwords" hidden="true" data-category="panePrivacy" />
|
|
555
|
555
|
|
|
556
|
|
-#include ../onionservices/content/authPreferences.inc.xhtml
|
|
|
556
|
+<html:setting-group groupid="onionSiteAuthentication" hidden="true" data-category="panePrivacy" />
|
|
557
|
557
|
|
|
558
|
558
|
<html:setting-group data-category="panePrivacy" data-subcategory="payment-methods-autofill credit-card-autofill" groupid="payments" data-group="formAutofill" hidden="true" />
|
|
559
|
559
|
<html:setting-group data-category="panePrivacy" data-subcategory="addresses-autofill address-autofill" groupid="addresses" data-group="formAutofill" hidden="true" />
|
browser/components/preferences/privacy.js
| ... |
... |
@@ -64,12 +64,6 @@ ChromeUtils.defineLazyGetter(lazy, "gParentalControlsService", () => |
|
64
|
64
|
: null
|
|
65
|
65
|
);
|
|
66
|
66
|
|
|
67
|
|
-XPCOMUtils.defineLazyScriptGetter(
|
|
68
|
|
- this,
|
|
69
|
|
- ["OnionServicesAuthPreferences"],
|
|
70
|
|
- "chrome://browser/content/onionservices/authPreferences.js"
|
|
71
|
|
-);
|
|
72
|
|
-
|
|
73
|
67
|
// TODO: module import via ChromeUtils.defineModuleGetter
|
|
74
|
68
|
XPCOMUtils.defineLazyScriptGetter(
|
|
75
|
69
|
this,
|
| ... |
... |
@@ -592,6 +586,15 @@ Preferences.addSetting({ |
|
592
|
586
|
pref: "signon.management.page.breach-alerts.enabled",
|
|
593
|
587
|
});
|
|
594
|
588
|
|
|
|
589
|
+Preferences.addSetting({
|
|
|
590
|
+ id: "onionSiteSavedKeys",
|
|
|
591
|
+ onUserClick: () => {
|
|
|
592
|
+ gSubDialog.open(
|
|
|
593
|
+ "chrome://browser/content/onionservices/savedKeysDialog.xhtml"
|
|
|
594
|
+ );
|
|
|
595
|
+ },
|
|
|
596
|
+});
|
|
|
597
|
+
|
|
595
|
598
|
/**
|
|
596
|
599
|
* This class is used to create Settings that are used to warn the user about
|
|
597
|
600
|
* potential misconfigurations. It should be passed into Preferences.addSetting
|
| ... |
... |
@@ -3577,6 +3580,7 @@ var gPrivacyPane = { |
|
3577
|
3580
|
initSettingGroup("browsingProtection");
|
|
3578
|
3581
|
initSettingGroup("cookiesAndSiteData");
|
|
3579
|
3582
|
initSettingGroup("cookiesAndSiteData2");
|
|
|
3583
|
+ initSettingGroup("onionSiteAuthentication");
|
|
3580
|
3584
|
initSettingGroup("certificates");
|
|
3581
|
3585
|
initSettingGroup("ipprotection");
|
|
3582
|
3586
|
// NOTE: "payments" and "addresses" are usually initialised by
|
| ... |
... |
@@ -3605,7 +3609,6 @@ var gPrivacyPane = { |
|
3605
|
3609
|
this._initTrackingProtectionExtensionControl();
|
|
3606
|
3610
|
this._ensureTrackingProtectionExceptionListMigration();
|
|
3607
|
3611
|
this._initProfilesInfo();
|
|
3608
|
|
- OnionServicesAuthPreferences.init();
|
|
3609
|
3612
|
this._initSecurityLevel();
|
|
3610
|
3613
|
|
|
3611
|
3614
|
Preferences.get("privacy.trackingprotection.enabled").on(
|
browser/components/securitylevel/content/securityLevelPanel.inc.xhtml
| ... |
... |
@@ -18,7 +18,7 @@ |
|
18
|
18
|
<html:a
|
|
19
|
19
|
is="moz-support-link"
|
|
20
|
20
|
id="securityLevel-learnMore"
|
|
21
|
|
- tor-manual-page="security-settings"
|
|
|
21
|
+ support-page="tor-manual:security-settings"
|
|
22
|
22
|
data-l10n-id="security-level-panel-learn-more-link"
|
|
23
|
23
|
></html:a>
|
|
24
|
24
|
<html:img id="securityLevel-background-image" alt="" />
|
browser/components/securitylevel/content/securityLevelPreferences.inc.xhtml
| ... |
... |
@@ -13,7 +13,7 @@ |
|
13
|
13
|
></html:span>
|
|
14
|
14
|
<html:a
|
|
15
|
15
|
is="moz-support-link"
|
|
16
|
|
- tor-manual-page="security-settings"
|
|
|
16
|
+ support-page="tor-manual:security-settings"
|
|
17
|
17
|
data-l10n-id="security-level-preferences-learn-more-link"
|
|
18
|
18
|
></html:a>
|
|
19
|
19
|
</description>
|
toolkit/content/widgets/moz-support-link/moz-support-link.mjs
| ... |
... |
@@ -17,9 +17,7 @@ window.MozXULElement?.insertFTLIfNeeded("toolkit/global/mozSupportLink.ftl"); |
|
17
|
17
|
export default class MozSupportLink extends HTMLAnchorElement {
|
|
18
|
18
|
static SUPPORT_URL = "https://www.mozilla.org/";
|
|
19
|
19
|
static get observedAttributes() {
|
|
20
|
|
- // We add tor-manual-page for pages hosted at tor project. Also shared with
|
|
21
|
|
- // base-browser/mullvad-browser. See tor-browser#42583.
|
|
22
|
|
- return ["support-page", "utm-content", "tor-manual-page"];
|
|
|
20
|
+ return ["support-page", "utm-content"];
|
|
23
|
21
|
}
|
|
24
|
22
|
|
|
25
|
23
|
/**
|
| ... |
... |
@@ -97,22 +95,21 @@ export default class MozSupportLink extends HTMLAnchorElement { |
|
97
|
95
|
}
|
|
98
|
96
|
|
|
99
|
97
|
attributeChangedCallback(attrName) {
|
|
100
|
|
- if (
|
|
101
|
|
- attrName === "support-page" ||
|
|
102
|
|
- attrName === "utm-content" ||
|
|
103
|
|
- attrName === "tor-manual-page"
|
|
104
|
|
- ) {
|
|
|
98
|
+ if (attrName === "support-page" || attrName === "utm-content") {
|
|
105
|
99
|
this.#setHref();
|
|
106
|
100
|
}
|
|
107
|
101
|
}
|
|
108
|
102
|
|
|
109
|
103
|
#setHref() {
|
|
110
|
|
- let torManualPage = this.getAttribute("tor-manual-page");
|
|
111
|
|
- if (torManualPage) {
|
|
|
104
|
+ let supportPage = this.getAttribute("support-page") ?? "";
|
|
|
105
|
+ // Support pages that start with "tor-manual:" are meant to point to the
|
|
|
106
|
+ // Tor Project's support pages. See tor-browser#44903.
|
|
|
107
|
+ const torManualPrefix = "tor-manual:";
|
|
|
108
|
+ if (supportPage.startsWith(torManualPrefix)) {
|
|
|
109
|
+ const torManualPage = supportPage.substring(torManualPrefix.length);
|
|
112
|
110
|
this.href = `about:manual#${torManualPage}`;
|
|
113
|
111
|
return;
|
|
114
|
112
|
}
|
|
115
|
|
- let supportPage = this.getAttribute("support-page") ?? "";
|
|
116
|
113
|
// For base-browser we sometimes want to override firefox support links with
|
|
117
|
114
|
// our own.
|
|
118
|
115
|
// See tor-browser#40899.
|
toolkit/locales/en-US/toolkit/global/tor-browser.ftl
| ... |
... |
@@ -704,12 +704,15 @@ page-info-onion-site-encryption-with-bits = Connection encrypted (Onion site, { |
|
704
|
704
|
page-info-onion-site-encryption-plain = Connection encrypted (Onion site)
|
|
705
|
705
|
|
|
706
|
706
|
## Onion site authentication preferences.
|
|
707
|
|
-## "Onion site" is an abbreviation of "onion website": a website whose domain URL ends in ".onion", which is reachable through the Tor network.
|
|
708
|
707
|
|
|
709
|
|
-onion-site-authentication-preferences-heading = Onion site authentication
|
|
710
|
|
-onion-site-authentication-preferences-overview = Some onion sites require that you identify yourself with a key (a kind of password) before you can access them.
|
|
711
|
|
-onion-site-authentication-preferences-learn-more = Learn more
|
|
712
|
|
-onion-site-authentication-preferences-saved-keys-button = Saved keys…
|
|
|
708
|
+# "Onion site" is an abbreviation of "onion website": a website whose domain URL ends in ".onion", which is reachable through the Tor network.
|
|
|
709
|
+# Here "key" is a noun, and refers to a special code that gives the user access to a website.
|
|
|
710
|
+onion-site-authentication-group =
|
|
|
711
|
+ .label = Onion site authentication
|
|
|
712
|
+ .description = Some onion sites require that you identify yourself with a key (a kind of password) before you can access them.
|
|
|
713
|
+# Here "key" is a noun, and refers to a special code that gives the user access to a website.
|
|
|
714
|
+onion-site-authentication-saved-keys-button =
|
|
|
715
|
+ .label = Saved keys…
|
|
713
|
716
|
|
|
714
|
717
|
## Onion site saved keys dialog.
|
|
715
|
718
|
## "Onion site" is an abbreviation of "onion website": a website whose domain URL ends in ".onion", which is reachable through the Tor network.
|
tools/torbrowser/l10n/migrations/bug-44904-onion-sites-setting-group.py
|
|
1
|
+from fluent.migrate.helpers import transforms_from
|
|
|
2
|
+
|
|
|
3
|
+
|
|
|
4
|
+def migrate(ctx):
|
|
|
5
|
+ ctx.add_transforms(
|
|
|
6
|
+ "tor-browser.ftl",
|
|
|
7
|
+ "tor-browser.ftl",
|
|
|
8
|
+ transforms_from(
|
|
|
9
|
+ """
|
|
|
10
|
+onion-site-authentication-group =
|
|
|
11
|
+ .label = { COPY_PATTERN(path, "onion-site-authentication-preferences-heading") }
|
|
|
12
|
+ .description = { COPY_PATTERN(path, "onion-site-authentication-preferences-overview") }
|
|
|
13
|
+onion-site-authentication-saved-keys-button =
|
|
|
14
|
+ .label = { COPY_PATTERN(path, "onion-site-authentication-preferences-saved-keys-button") }
|
|
|
15
|
+""",
|
|
|
16
|
+ path="tor-browser.ftl",
|
|
|
17
|
+ ),
|
|
|
18
|
+ ) |
|