tor-commits
Threads by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- 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
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 1 participants
- 215500 discussions
[Git][tpo/applications/tor-browser][base-browser-102.12.0esr-12.5-1] fixup! Bug 32308: use direct browser sizing for letterboxing.
by ma1 (@ma1) 12 Jun '23
by ma1 (@ma1) 12 Jun '23
12 Jun '23
ma1 pushed to branch base-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
c8ea1c20 by hackademix at 2023-06-12T10:30:29+02:00
fixup! Bug 32308: use direct browser sizing for letterboxing.
- - - - -
1 changed file:
- toolkit/components/resistfingerprinting/RFPHelper.jsm
Changes:
=====================================
toolkit/components/resistfingerprinting/RFPHelper.jsm
=====================================
@@ -51,7 +51,7 @@ function forEachWindow(callback) {
async function windowResizeHandler(aEvent) {
- if (RFPHelper.letterboxingEnabled) {
+ if (RFPHelper.letterboxingEnabled || !RFPHelper.rfpEnabled) {
return;
}
if (Services.prefs.getIntPref(kPrefResizeWarnings) <= 0) {
@@ -250,7 +250,9 @@ class _RFPHelper {
}
_handleResistFingerprintingChanged() {
- if (Services.prefs.getBoolPref(kPrefResistFingerprinting)) {
+ if (
+ (this.rfpEnabled = Services.prefs.getBoolPref(kPrefResistFingerprinting))
+ ) {
this._addRFPObservers();
Services.ww.registerNotification(this);
forEachWindow(win => this._attachWindow(win));
@@ -397,7 +399,9 @@ class _RFPHelper {
kPrefLetterboxing,
false
);
- forEachWindow(win => this._updateSizeForTabsInWindow(win));
+ if (this.rfpEnabled) {
+ forEachWindow(win => this._updateSizeForTabsInWindow(win));
+ }
}
// The function to parse the dimension set from the pref value. The pref value
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/c8ea1c2…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/c8ea1c2…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.5-1] fixup! Bug 32308: use direct browser sizing for letterboxing.
by ma1 (@ma1) 12 Jun '23
by ma1 (@ma1) 12 Jun '23
12 Jun '23
ma1 pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
1fac685b by hackademix at 2023-06-12T09:22:03+02:00
fixup! Bug 32308: use direct browser sizing for letterboxing.
- - - - -
1 changed file:
- toolkit/components/resistfingerprinting/RFPHelper.jsm
Changes:
=====================================
toolkit/components/resistfingerprinting/RFPHelper.jsm
=====================================
@@ -51,7 +51,7 @@ function forEachWindow(callback) {
async function windowResizeHandler(aEvent) {
- if (RFPHelper.letterboxingEnabled) {
+ if (RFPHelper.letterboxingEnabled || !RFPHelper.rfpEnabled) {
return;
}
if (Services.prefs.getIntPref(kPrefResizeWarnings) <= 0) {
@@ -250,7 +250,9 @@ class _RFPHelper {
}
_handleResistFingerprintingChanged() {
- if (Services.prefs.getBoolPref(kPrefResistFingerprinting)) {
+ if (
+ (this.rfpEnabled = Services.prefs.getBoolPref(kPrefResistFingerprinting))
+ ) {
this._addRFPObservers();
Services.ww.registerNotification(this);
forEachWindow(win => this._attachWindow(win));
@@ -397,7 +399,9 @@ class _RFPHelper {
kPrefLetterboxing,
false
);
- forEachWindow(win => this._updateSizeForTabsInWindow(win));
+ if (this.rfpEnabled) {
+ forEachWindow(win => this._updateSizeForTabsInWindow(win));
+ }
}
// The function to parse the dimension set from the pref value. The pref value
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/1fac685…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/1fac685…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.5-1] fixup! TB3: Tor Browser's official .mozconfigs.
by Pier Angelo Vendrame (@pierov) 10 Jun '23
by Pier Angelo Vendrame (@pierov) 10 Jun '23
10 Jun '23
Pier Angelo Vendrame pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
1ebff487 by Dan Ballard at 2023-06-10T12:26:20+00:00
fixup! TB3: Tor Browser's official .mozconfigs.
Bug 41828: Remove --with-tor-browser-version from tor-browser-android mozconfig
- - - - -
1 changed file:
- browser/config/mozconfigs/tor-browser-android
Changes:
=====================================
browser/config/mozconfigs/tor-browser-android
=====================================
@@ -1,7 +1,3 @@
. $topsrcdir/browser/config/mozconfigs/base-browser-android
mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
-
-if test ! -z "$LOCAL_DEV_BUILD"; then
- ac_add_options --with-tor-browser-version=dev-build
-fi
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/1ebff48…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/1ebff48…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser-build] Pushed new tag tbb-12.5a7-build1
by richard (@richard) 09 Jun '23
by richard (@richard) 09 Jun '23
09 Jun '23
richard pushed new tag tbb-12.5a7-build1 at The Tor Project / Applications / tor-browser-build
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/tree/tbb…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser-build][main] Bug 40865: Tor Browser 12.5a7
by richard (@richard) 09 Jun '23
by richard (@richard) 09 Jun '23
09 Jun '23
richard pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
0ce5dccf by Richard Pospesel at 2023-06-08T17:29:52+00:00
Bug 40865: Tor Browser 12.5a7
- - - - -
8 changed files:
- projects/browser/Bundle-Data/Docs-TBB/ChangeLog.txt
- projects/browser/allowed_addons.json
- projects/firefox/config
- projects/geckoview/config
- projects/go/config
- projects/openssl/config
- projects/translation/config
- rbm.conf
Changes:
=====================================
projects/browser/Bundle-Data/Docs-TBB/ChangeLog.txt
=====================================
@@ -1,3 +1,62 @@
+Tor Browser 12.5a7 - June 08 2023
+ * All Platforms
+ * Updated Translations
+ * Updated NoScript to 11.4.22
+ * Updated OpenSSL to 1.1.1u
+ * Bug 41795: Rebase Tor Browser and Base Browser alpha to 102.12esr [tor-browser]
+ * Bug 41818: Remove YEC 2022 strings [tor-browser]
+ * Windows + macOS + Linux
+ * Updated Firefox to 102.12esr
+ * Bug 33298: HTTP onion sites do not give a popup warning when submitting form data to non-onion HTTP sites [tor-browser]
+ * Bug 40552: New texts for the add a bridge manually modal [tor-browser]
+ * Bug 41608: Improve the UX of the location bar's connection status [tor-browser]
+ * Bug 41618: Update the iconography used in the status strip in connection settings [tor-browser]
+ * Bug 41623: Update connection assist's iconography [tor-browser]
+ * Bug 41718: Add the external filetype warning to about:downloads [tor-browser]
+ * Bug 41726: Animate the torconnect icon to transition between connected states [tor-browser]
+ * Bug 41734: Add a `Connected` flag to indicate which built-in bridge option Tor Browser is currently using [tor-browser]
+ * Bug 41749: Replace the onion-glyph with dedicated icon for onion services [tor-browser]
+ * Bug 41785: Network monitor in developer tools shows HTTP onion resources as insecure [tor-browser]
+ * Bug 41792: Drag and Drop protection prevents dragging downloads [tor-browser]
+ * Bug 41800: Add the external filetype warning to Library / Manage Bookmarks [tor-browser]
+ * Bug 41801: Fix handleProcessReady in TorSettings.init [tor-browser]
+ * Bug 41802: Conjure bridge cards are mislabeled as vanilla bridges in alpha [tor-browser]
+ * Bug 41809: Wrong icon in the bridge QR code [tor-browser]
+ * Bug 41810: Add "Connect" buttons to Request Bridge and Provide Bridge modals [tor-browser]
+ * Bug 41815: wrong connect icons [tor-browser]
+ * Bug 41816: The top navigation in about:torconnect isn't updated correctly [tor-browser]
+ * Android
+ * Updated GeckoView to 102.12esr
+ * Build System
+ * All Platforms
+ * Bug 40777: Create a Go bootstrap project [tor-browser-build]
+ * Bug 40850: Tor Browser nightly fails to build obfs4 [tor-browser-build]
+ * Bug 40866: Remove `Using ansible to set up a nightly build machine` from README [tor-browser-build]
+ * Bug 40869: obfs4 is renamed to lyrebird [tor-browser-build]
+ * Bug 40870: Remove url without browser name from tools/signing/download-unsigned-sha256sums-gpg-signatures-from-people-tpo [tor-browser-build]
+ * Bug 40871: Update keyring/boklm.gpg for new subkeys [tor-browser-build]
+ * Windows + macOS + Linux
+ * Bug 40864: Make a script to update the manual artifact [tor-browser-build]
+ * macOS
+ * Bug 40847: Build filesystem influences the DMG creation [tor-browser-build]
+ * Bug 40858: Create script to assist testers self sign Mac builds to allow running on Arm processors [tor-browser-build]
+ * Android
+ * Bug 40874: Add commit information also to GV [tor-browser-build]
+
+Tor Browser 12.0.7 - May 31 2023
+ * All Platforms
+ * Updated Translations
+ * Updated NoScript to 11.4.22
+ * Updated OpenSSL to 1.1.1u
+ * Bug 41764: TTP-02-004 OOS: No user-activation required to download files (Low) [tor-browser]
+ * Bug 41794: Rebase Tor Browser and Base Browser stable to 102.12esr [tor-browser]
+ * Windows + macOS + Linux
+ * Updated Firefox to 102.12esr
+ * Bug 41777: Internally shippped manual does not adapt to RTL languages (it always align to the left) [tor-browser]
+ * Android
+ * Updated GeckoView to 102.12esr
+ * Bug 41805: Backport Android-specific security fixes from Firefox 114 to ESR 102.12-based Tor Browser [tor-browser]
+
Tor Browser 12.5a6 - May 22 2023
* All Platforms
* Updated Translations
=====================================
projects/browser/allowed_addons.json
=====================================
@@ -17,7 +17,7 @@
"picture_url": "https://addons.mozilla.org/user-media/userpics/34/9734/13299734/13299734.pn…"
}
],
- "average_daily_users": 988302,
+ "average_daily_users": 974265,
"categories": {
"android": [
"experimental",
@@ -221,10 +221,10 @@
"category": "recommended"
},
"ratings": {
- "average": 4.5608,
- "bayesian_average": 4.559632030468385,
- "count": 5005,
- "text_count": 1581
+ "average": 4.5603,
+ "bayesian_average": 4.559134490716616,
+ "count": 5024,
+ "text_count": 1583
},
"ratings_url": "https://addons.mozilla.org/en-US/firefox/addon/darkreader/reviews/",
"requires_payment": false,
@@ -321,7 +321,7 @@
"type": "extension",
"url": "https://addons.mozilla.org/en-US/firefox/addon/darkreader/",
"versions_url": "https://addons.mozilla.org/en-US/firefox/addon/darkreader/versions/",
- "weekly_downloads": 24550
+ "weekly_downloads": 23662
},
"notes": null
},
@@ -337,7 +337,7 @@
"picture_url": "https://addons.mozilla.org/user-media/userpics/56/7656/6937656/6937656.png?…"
}
],
- "average_daily_users": 258950,
+ "average_daily_users": 254515,
"categories": {
"android": [
"security-privacy"
@@ -553,10 +553,10 @@
"category": "recommended"
},
"ratings": {
- "average": 4.8136,
- "bayesian_average": 4.808937485557134,
- "count": 1336,
- "text_count": 237
+ "average": 4.8143,
+ "bayesian_average": 4.80964333371513,
+ "count": 1341,
+ "text_count": 238
},
"ratings_url": "https://addons.mozilla.org/en-US/firefox/addon/decentraleyes/reviews/",
"requires_payment": false,
@@ -641,7 +641,7 @@
"type": "extension",
"url": "https://addons.mozilla.org/en-US/firefox/addon/decentraleyes/",
"versions_url": "https://addons.mozilla.org/en-US/firefox/addon/decentraleyes/versions/",
- "weekly_downloads": 3514
+ "weekly_downloads": 3353
},
"notes": null
},
@@ -657,7 +657,7 @@
"picture_url": "https://addons.mozilla.org/user-media/userpics/73/4073/5474073/5474073.png?…"
}
],
- "average_daily_users": 1133122,
+ "average_daily_users": 1107157,
"categories": {
"android": [
"security-privacy"
@@ -1180,10 +1180,10 @@
"category": "recommended"
},
"ratings": {
- "average": 4.802,
- "bayesian_average": 4.79921587479466,
- "count": 2232,
- "text_count": 426
+ "average": 4.8015,
+ "bayesian_average": 4.798717494585019,
+ "count": 2237,
+ "text_count": 428
},
"ratings_url": "https://addons.mozilla.org/en-US/firefox/addon/privacy-badger17/reviews/",
"requires_payment": false,
@@ -1207,7 +1207,7 @@
"type": "extension",
"url": "https://addons.mozilla.org/en-US/firefox/addon/privacy-badger17/",
"versions_url": "https://addons.mozilla.org/en-US/firefox/addon/privacy-badger17/versions/",
- "weekly_downloads": 18346
+ "weekly_downloads": 16875
},
"notes": null
},
@@ -1223,7 +1223,7 @@
"picture_url": null
}
],
- "average_daily_users": 6410036,
+ "average_daily_users": 6308349,
"categories": {
"android": [
"security-privacy"
@@ -1388,7 +1388,7 @@
},
"is_disabled": false,
"is_experimental": false,
- "last_updated": "2023-05-21T19:05:37Z",
+ "last_updated": "2023-06-05T13:00:36Z",
"name": {
"ar": "uBlock Origin",
"bg": "uBlock Origin",
@@ -1533,10 +1533,10 @@
"category": "recommended"
},
"ratings": {
- "average": 4.7807,
- "bayesian_average": 4.780299334467883,
- "count": 15437,
- "text_count": 4014
+ "average": 4.7814,
+ "bayesian_average": 4.78100041890513,
+ "count": 15510,
+ "text_count": 4029
},
"ratings_url": "https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/reviews/",
"requires_payment": false,
@@ -1598,7 +1598,7 @@
"type": "extension",
"url": "https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/",
"versions_url": "https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/versions/",
- "weekly_downloads": 131360
+ "weekly_downloads": 129841
},
"notes": null
},
@@ -1614,7 +1614,7 @@
"picture_url": null
}
],
- "average_daily_users": 168477,
+ "average_daily_users": 168486,
"categories": {
"android": [
"photos-media"
@@ -1713,10 +1713,10 @@
"category": "recommended"
},
"ratings": {
- "average": 4.4875,
- "bayesian_average": 4.482377575890338,
- "count": 1118,
- "text_count": 418
+ "average": 4.4857,
+ "bayesian_average": 4.480580193554738,
+ "count": 1120,
+ "text_count": 420
},
"ratings_url": "https://addons.mozilla.org/en-US/firefox/addon/video-background-play-fix/re…",
"requires_payment": false,
@@ -1738,7 +1738,7 @@
"type": "extension",
"url": "https://addons.mozilla.org/en-US/firefox/addon/video-background-play-fix/",
"versions_url": "https://addons.mozilla.org/en-US/firefox/addon/video-background-play-fix/ve…",
- "weekly_downloads": 387
+ "weekly_downloads": 364
},
"notes": null
},
@@ -1754,7 +1754,7 @@
"picture_url": null
}
],
- "average_daily_users": 88341,
+ "average_daily_users": 87680,
"categories": {
"android": [
"experimental",
@@ -1892,7 +1892,7 @@
"type": "extension",
"url": "https://addons.mozilla.org/en-US/firefox/addon/privacy-possum/",
"versions_url": "https://addons.mozilla.org/en-US/firefox/addon/privacy-possum/versions/",
- "weekly_downloads": 1535
+ "weekly_downloads": 1851
},
"notes": null
},
@@ -1908,7 +1908,7 @@
"picture_url": "https://addons.mozilla.org/user-media/userpics/64/9064/12929064/12929064.pn…"
}
],
- "average_daily_users": 262509,
+ "average_daily_users": 259528,
"categories": {
"android": [
"photos-media",
@@ -2127,10 +2127,10 @@
"category": "recommended"
},
"ratings": {
- "average": 4.6537,
- "bayesian_average": 4.648959055095389,
- "count": 1262,
- "text_count": 242
+ "average": 4.6515,
+ "bayesian_average": 4.646797768590084,
+ "count": 1274,
+ "text_count": 245
},
"ratings_url": "https://addons.mozilla.org/en-US/firefox/addon/search_by_image/reviews/",
"requires_payment": false,
@@ -2151,7 +2151,7 @@
"type": "extension",
"url": "https://addons.mozilla.org/en-US/firefox/addon/search_by_image/",
"versions_url": "https://addons.mozilla.org/en-US/firefox/addon/search_by_image/versions/",
- "weekly_downloads": 3984
+ "weekly_downloads": 3778
},
"notes": null
},
@@ -2174,7 +2174,7 @@
"picture_url": null
}
],
- "average_daily_users": 111302,
+ "average_daily_users": 111546,
"categories": {
"android": [
"other"
@@ -2457,9 +2457,9 @@
"category": "recommended"
},
"ratings": {
- "average": 4.4439,
- "bayesian_average": 4.439229613376027,
- "count": 1212,
+ "average": 4.442,
+ "bayesian_average": 4.437335162834797,
+ "count": 1215,
"text_count": 322
},
"ratings_url": "https://addons.mozilla.org/en-US/firefox/addon/google-search-fixer/reviews/",
@@ -2480,7 +2480,7 @@
"type": "extension",
"url": "https://addons.mozilla.org/en-US/firefox/addon/google-search-fixer/",
"versions_url": "https://addons.mozilla.org/en-US/firefox/addon/google-search-fixer/versions/",
- "weekly_downloads": 32
+ "weekly_downloads": 24
},
"notes": null
},
@@ -2496,7 +2496,7 @@
"picture_url": "https://addons.mozilla.org/user-media/userpics/43/0143/143/143.png?modified…"
}
],
- "average_daily_users": 314158,
+ "average_daily_users": 306985,
"categories": {
"android": [
"performance",
@@ -2686,10 +2686,10 @@
"category": "recommended"
},
"ratings": {
- "average": 4.4074,
- "bayesian_average": 4.404687188031893,
- "count": 2067,
- "text_count": 803
+ "average": 4.4057,
+ "bayesian_average": 4.402993200065393,
+ "count": 2073,
+ "text_count": 804
},
"ratings_url": "https://addons.mozilla.org/en-US/firefox/addon/noscript/reviews/",
"requires_payment": false,
@@ -2733,7 +2733,7 @@
"type": "extension",
"url": "https://addons.mozilla.org/en-US/firefox/addon/noscript/",
"versions_url": "https://addons.mozilla.org/en-US/firefox/addon/noscript/versions/",
- "weekly_downloads": 7591
+ "weekly_downloads": 7512
},
"notes": null
},
@@ -2749,7 +2749,7 @@
"picture_url": null
}
],
- "average_daily_users": 151904,
+ "average_daily_users": 150648,
"categories": {
"android": [
"performance",
@@ -2864,9 +2864,9 @@
"category": "recommended"
},
"ratings": {
- "average": 3.9026,
- "bayesian_average": 3.898323122758472,
- "count": 1129,
+ "average": 3.9003,
+ "bayesian_average": 3.8960318617843828,
+ "count": 1133,
"text_count": 401
},
"ratings_url": "https://addons.mozilla.org/en-US/firefox/addon/youtube-high-definition/revi…",
@@ -2886,7 +2886,7 @@
"type": "extension",
"url": "https://addons.mozilla.org/en-US/firefox/addon/youtube-high-definition/",
"versions_url": "https://addons.mozilla.org/en-US/firefox/addon/youtube-high-definition/vers…",
- "weekly_downloads": 1860
+ "weekly_downloads": 1940
},
"notes": null
}
=====================================
projects/firefox/config
=====================================
@@ -11,11 +11,11 @@ container:
use_container: 1
var:
- firefox_platform_version: 102.11.0
+ firefox_platform_version: 102.12.0
firefox_version: '[% c("var/firefox_platform_version") %]esr'
browser_series: '12.5'
browser_branch: '[% c("var/browser_series") %]-1'
- browser_build: 3
+ browser_build: 2
branding_directory_prefix: 'tb'
copyright_year: '[% exec("git show -s --format=%ci").remove("-.*") %]'
nightly_updates_publish_dir: '[% c("var/nightly_updates_publish_dir_prefix") %]nightly-[% c("var/osname") %]'
=====================================
projects/geckoview/config
=====================================
@@ -11,9 +11,9 @@ container:
use_container: 1
var:
- geckoview_version: 102.11.0esr
+ geckoview_version: 102.12.0esr
browser_branch: 12.5-1
- browser_build: 3
+ browser_build: 2
copyright_year: '[% exec("git show -s --format=%ci").remove("-.*") %]'
gitlab_project: https://gitlab.torproject.org/tpo/applications/tor-browser
git_commit: '[% exec("git rev-parse HEAD") %]'
=====================================
projects/go/config
=====================================
@@ -1,5 +1,5 @@
# vim: filetype=yaml sw=2
-version: 1.20.4
+version: 1.20.5
filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
container:
use_container: 1
@@ -119,7 +119,7 @@ input_files:
enable: '[% ! c("var/linux") %]'
- URL: 'https://golang.org/dl/go[% c("version") %].src.tar.gz'
name: go
- sha256sum: 9f34ace128764b7a3a4b238b805856cc1b2184304df9e5690825b0710f4202d6
+ sha256sum: 9a15c133ba2cfafe79652f4815b62e7cfc267f68df1b9454c6ab2a3ca8b96a88
- project: go-bootstrap
name: go-bootstrap
target_replace:
=====================================
projects/openssl/config
=====================================
@@ -1,5 +1,5 @@
# vim: filetype=yaml sw=2
-version: 1.1.1t
+version: 1.1.1u
filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
container:
use_container: 1
@@ -34,4 +34,4 @@ input_files:
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
- URL: 'https://www.openssl.org/source/openssl-[% c("version") %].tar.gz'
- sha256sum: 8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b
+ sha256sum: e2f8d84b523eecd06c7be7626830370300fbcc15386bf5142d72758f6963ebc6
=====================================
projects/translation/config
=====================================
@@ -6,19 +6,19 @@ version: '[% c("abbrev") %]'
steps:
base-browser:
base-browser: '[% INCLUDE build %]'
- git_hash: f1f1204c2421db64ae3d30be31a4d7819b9a3e42
+ git_hash: 0a429fd14e8ebe9edcdbaac933c86b4bac8fcb19
targets:
nightly:
git_hash: 'base-browser'
base-browser-fluent:
base-browser-fluent: '[% INCLUDE build %]'
- git_hash: 3167fc379caac406941ae4fce429c302fd1a6d5d
+ git_hash: c68657f80050975474903f170250e2888c2a1fea
targets:
nightly:
git_hash: 'basebrowser-newidentityftl'
tor-browser:
tor-browser: '[% INCLUDE build %]'
- git_hash: 7089eb9ac06e0f6de99c386a09821c8799849206
+ git_hash: 0cd2ac8d14ce4acd8c9781376a9fdcb9c8323b91
targets:
nightly:
git_hash: 'tor-browser'
@@ -26,7 +26,7 @@ steps:
fenix: '[% INCLUDE build %]'
# We need to bump the commit before releasing but just pointing to a branch
# might cause too much rebuidling of the Firefox part.
- git_hash: 65def475aa000981ac3c1b6db203e8e707f72e16
+ git_hash: 1b094bdfaa444d31f06fe7c0261de89ae67083cc
targets:
nightly:
git_hash: 'fenix-torbrowserstringsxml'
=====================================
rbm.conf
=====================================
@@ -94,11 +94,12 @@ buildconf:
git_signtag_opt: '-s'
var:
- torbrowser_version: '12.5a6'
+ torbrowser_version: '12.5a7'
torbrowser_build: 'build1'
torbrowser_incremental_from:
- 12.5a4
- 12.5a5
+ - 12.5a6
updater_enabled: 1
build_mar: 1
mar_channel_id: '[% c("var/projectname") %]-torproject-[% c("var/channel") %]'
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/0…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/0…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser-update-responses][main] alpha: new version, 12.5a7
by boklm (@boklm) 09 Jun '23
by boklm (@boklm) 09 Jun '23
09 Jun '23
boklm pushed to branch main at The Tor Project / Applications / Tor Browser update responses
Commits:
975298b5 by Nicolas Vigier at 2023-06-09T12:43:54+02:00
alpha: new version, 12.5a7
- - - - -
30 changed files:
- update_3/alpha/.htaccess
- − update_3/alpha/12.5a4-12.5a6-linux32-ALL.xml
- − update_3/alpha/12.5a4-12.5a6-linux64-ALL.xml
- − update_3/alpha/12.5a4-12.5a6-macos-ALL.xml
- − update_3/alpha/12.5a4-12.5a6-win32-ALL.xml
- − update_3/alpha/12.5a4-12.5a6-win64-ALL.xml
- + update_3/alpha/12.5a4-12.5a7-linux32-ALL.xml
- + update_3/alpha/12.5a4-12.5a7-linux64-ALL.xml
- + update_3/alpha/12.5a4-12.5a7-macos-ALL.xml
- + update_3/alpha/12.5a4-12.5a7-win32-ALL.xml
- + update_3/alpha/12.5a4-12.5a7-win64-ALL.xml
- − update_3/alpha/12.5a5-12.5a6-linux32-ALL.xml
- − update_3/alpha/12.5a5-12.5a6-linux64-ALL.xml
- − update_3/alpha/12.5a5-12.5a6-macos-ALL.xml
- − update_3/alpha/12.5a5-12.5a6-win32-ALL.xml
- − update_3/alpha/12.5a5-12.5a6-win64-ALL.xml
- + update_3/alpha/12.5a5-12.5a7-linux32-ALL.xml
- + update_3/alpha/12.5a5-12.5a7-linux64-ALL.xml
- + update_3/alpha/12.5a5-12.5a7-macos-ALL.xml
- + update_3/alpha/12.5a5-12.5a7-win32-ALL.xml
- + update_3/alpha/12.5a5-12.5a7-win64-ALL.xml
- + update_3/alpha/12.5a6-12.5a7-linux32-ALL.xml
- + update_3/alpha/12.5a6-12.5a7-linux64-ALL.xml
- + update_3/alpha/12.5a6-12.5a7-macos-ALL.xml
- + update_3/alpha/12.5a6-12.5a7-win32-ALL.xml
- + update_3/alpha/12.5a6-12.5a7-win64-ALL.xml
- − update_3/alpha/12.5a6-linux32-ALL.xml
- − update_3/alpha/12.5a6-linux64-ALL.xml
- − update_3/alpha/12.5a6-macos-ALL.xml
- − update_3/alpha/12.5a6-win32-ALL.xml
The diff was not included because it is too large.
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-update-responses…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-update-responses…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser] Pushed new tag FIREFOX_115_0b3_RELEASE
by Pier Angelo Vendrame (@pierov) 09 Jun '23
by Pier Angelo Vendrame (@pierov) 09 Jun '23
09 Jun '23
Pier Angelo Vendrame pushed new tag FIREFOX_115_0b3_RELEASE at The Tor Project / Applications / Tor Browser
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/tree/FIREFOX_1…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-13.0-1] fixup! Bug 40925: Implemented the Security Level component
by Pier Angelo Vendrame (@pierov) 09 Jun '23
by Pier Angelo Vendrame (@pierov) 09 Jun '23
09 Jun '23
Pier Angelo Vendrame pushed to branch tor-browser-102.12.0esr-13.0-1 at The Tor Project / Applications / Tor Browser
Commits:
5db35e85 by cypherpunks1 at 2023-06-08T23:51:40-08:00
fixup! Bug 40925: Implemented the Security Level component
Bug 26277: Skip the redirection page when searching with DuckDuckGo on the safest security level
- - - - -
1 changed file:
- toolkit/components/search/SearchEngine.jsm
Changes:
=====================================
toolkit/components/search/SearchEngine.jsm
=====================================
@@ -30,6 +30,12 @@ XPCOMUtils.defineLazyGetter(this, "logConsole", () => {
});
});
+XPCOMUtils.defineLazyScriptGetter(
+ this,
+ "SecurityLevelPrefs",
+ "chrome://browser/content/securitylevel/securityLevel.js"
+);
+
const USER_DEFINED = "searchTerms";
// Supported OpenSearch parameters
@@ -429,7 +435,17 @@ class EngineURL {
}
getSubmission(searchTerms, engine, purpose) {
- var url = ParamSubstitution(this.template, searchTerms, engine);
+ let urlTemplate = this.template;
+ if (
+ engine &&
+ (engine._extensionID === "ddg(a)search.mozilla.org" ||
+ engine._extensionID === "ddg-onion(a)search.mozilla.org") &&
+ this.type === SearchUtils.URL_TYPE.SEARCH &&
+ SecurityLevelPrefs?.securityLevel === "safest"
+ ) {
+ urlTemplate += "html";
+ }
+ var url = ParamSubstitution(urlTemplate, searchTerms, engine);
// Default to searchbar if the purpose is not provided
var requestPurpose = purpose || "searchbar";
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5db35e8…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5db35e8…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser-build][maint-12.0] 2 commits: Bug 40875: Re-enable Windows code signing in do-all-signing
by boklm (@boklm) 09 Jun '23
by boklm (@boklm) 09 Jun '23
09 Jun '23
boklm pushed to branch maint-12.0 at The Tor Project / Applications / tor-browser-build
Commits:
5966b10a by Nicolas Vigier at 2023-06-08T12:45:18+02:00
Bug 40875: Re-enable Windows code signing in do-all-signing
- - - - -
2cdecd5b by Nicolas Vigier at 2023-06-08T12:45:33+02:00
Bug 40877: Update osslsigncode to more recent version
- - - - -
6 changed files:
- − projects/osslsigncode/0001-Make-code-work-with-OpenSSL-1.1.patch
- projects/osslsigncode/build
- projects/osslsigncode/config
- − projects/osslsigncode/timestamping.patch
- tools/signing/authenticode-timestamping.sh
- tools/signing/do-all-signing
Changes:
=====================================
projects/osslsigncode/0001-Make-code-work-with-OpenSSL-1.1.patch deleted
=====================================
@@ -1,324 +0,0 @@
-From 86931f9d7c3d73b97010e598a5ad41ea4fab2b63 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= <Reimar.Doeffinger(a)gmx.de>
-Date: Sun, 12 Mar 2017 23:00:12 +0100
-Subject: [PATCH] Make code work with OpenSSL 1.1.
-
-Changes in consist of:
-- Use EVP_MD_CTX_new/free API instead of on-stack allocation
-- Remove some M_ prefixes like for ASN1_IA5STRING_new
-- Remove pagehash functionality because it is useless to me and
- fixing it would be a pain. Would require declaring a few
- ASN_SEQUENCES and use that to get the required i2d functions
- from what I could find out.
-- Remove OBJ_create calls that seem to serve no purpose,
- now crash because NULL pointers are no longer handled
- (who changes API that way?!) and even if that was fixed
- lead to errors when these objects are later created
- again/"for real" by OBJ_txt2nid or OBJ_txt2obj (I think,
- did not investigate further).
-
-diff --git a/osslsigncode.c b/osslsigncode.c
-index 2978c02..3797458 100644
---- a/osslsigncode.c
-+++ b/osslsigncode.c
-@@ -450,16 +450,16 @@ static SpcSpOpusInfo* createOpus(const char *desc, const char *url)
- if (desc) {
- info->programName = SpcString_new();
- info->programName->type = 1;
-- info->programName->value.ascii = M_ASN1_IA5STRING_new();
-- ASN1_STRING_set((ASN1_STRING *)info->programName->value.ascii,
-+ info->programName->value.ascii = ASN1_IA5STRING_new();
-+ ASN1_STRING_set(info->programName->value.ascii,
- (const unsigned char*)desc, strlen(desc));
- }
-
- if (url) {
- info->moreInfo = SpcLink_new();
- info->moreInfo->type = 0;
-- info->moreInfo->value.url = M_ASN1_IA5STRING_new();
-- ASN1_STRING_set((ASN1_STRING *)info->moreInfo->value.url,
-+ info->moreInfo->value.url = ASN1_IA5STRING_new();
-+ ASN1_STRING_set(info->moreInfo->value.url,
- (const unsigned char*)url, strlen(url));
- }
-
-@@ -609,19 +609,20 @@ static int add_timestamp(PKCS7 *sig, char *url, char *proxy, int rfc3161, const
-
- if (rfc3161) {
- unsigned char mdbuf[EVP_MAX_MD_SIZE];
-- EVP_MD_CTX mdctx;
-+ EVP_MD_CTX *mdctx = EVP_MD_CTX_new();
-
-- EVP_MD_CTX_init(&mdctx);
-- EVP_DigestInit(&mdctx, md);
-- EVP_DigestUpdate(&mdctx, si->enc_digest->data, si->enc_digest->length);
-- EVP_DigestFinal(&mdctx, mdbuf, NULL);
-+ EVP_DigestInit(mdctx, md);
-+ EVP_DigestUpdate(mdctx, si->enc_digest->data, si->enc_digest->length);
-+ EVP_DigestFinal(mdctx, mdbuf, NULL);
-+ EVP_MD_CTX_free(mdctx);
-+ mdctx = NULL;
-
- TimeStampReq *req = TimeStampReq_new();
- ASN1_INTEGER_set(req->version, 1);
- req->messageImprint->digestAlgorithm->algorithm = OBJ_nid2obj(EVP_MD_nid(md));
- req->messageImprint->digestAlgorithm->parameters = ASN1_TYPE_new();
- req->messageImprint->digestAlgorithm->parameters->type = V_ASN1_NULL;
-- M_ASN1_OCTET_STRING_set(req->messageImprint->digest, mdbuf, EVP_MD_size(md));
-+ ASN1_OCTET_STRING_set(req->messageImprint->digest, mdbuf, EVP_MD_size(md));
- req->certReq = (void*)0x1;
-
- len = i2d_TimeStampReq(req, NULL);
-@@ -921,83 +922,8 @@ static const unsigned char classid_page_hash[] = {
- 0xAE, 0x05, 0xA2, 0x17, 0xDA, 0x8E, 0x60, 0xD6
- };
-
--static unsigned char *calc_page_hash(char *indata, unsigned int peheader, int pe32plus,
-- unsigned int sigpos, int phtype, unsigned int *phlen);
--
--DECLARE_STACK_OF(ASN1_OCTET_STRING)
--#ifndef sk_ASN1_OCTET_STRING_new_null
--#define sk_ASN1_OCTET_STRING_new_null() SKM_sk_new_null(ASN1_OCTET_STRING)
--#define sk_ASN1_OCTET_STRING_free(st) SKM_sk_free(ASN1_OCTET_STRING, (st))
--#define sk_ASN1_OCTET_STRING_push(st, val) SKM_sk_push(ASN1_OCTET_STRING, (st), (val))
--#define i2d_ASN1_SET_OF_ASN1_OCTET_STRING(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-- SKM_ASN1_SET_OF_i2d(ASN1_OCTET_STRING, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
--#endif
--
--DECLARE_STACK_OF(SpcAttributeTypeAndOptionalValue)
--#ifndef sk_SpcAttributeTypeAndOptionalValue_new_null
--#define sk_SpcAttributeTypeAndOptionalValue_new_null() SKM_sk_new_null(SpcAttributeTypeAndOptionalValue)
--#define sk_SpcAttributeTypeAndOptionalValue_free(st) SKM_sk_free(SpcAttributeTypeAndOptionalValue, (st))
--#define sk_SpcAttributeTypeAndOptionalValue_push(st, val) SKM_sk_push(SpcAttributeTypeAndOptionalValue, (st), (val))
--#define i2d_SpcAttributeTypeAndOptionalValue(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-- SKM_ASN1_SET_OF_i2d(SpcAttributeTypeAndOptionalValue, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
--#endif
--
--static SpcLink *get_page_hash_link(int phtype, char *indata, unsigned int peheader, int pe32plus, unsigned int sigpos)
--{
-- unsigned int phlen;
-- unsigned char *ph = calc_page_hash(indata, peheader, pe32plus, sigpos, phtype, &phlen);
-- if (!ph) {
-- fprintf(stderr, "Failed to calculate page hash\n");
-- exit(-1);
-- }
--
-- ASN1_OCTET_STRING *ostr = M_ASN1_OCTET_STRING_new();
-- M_ASN1_OCTET_STRING_set(ostr, ph, phlen);
-- free(ph);
--
-- STACK_OF(ASN1_OCTET_STRING) *oset = sk_ASN1_OCTET_STRING_new_null();
-- sk_ASN1_OCTET_STRING_push(oset, ostr);
-- unsigned char *p, *tmp;
-- unsigned int l;
-- l = i2d_ASN1_SET_OF_ASN1_OCTET_STRING(oset, NULL, i2d_ASN1_OCTET_STRING,
-- V_ASN1_SET, V_ASN1_UNIVERSAL, IS_SET);
-- tmp = p = OPENSSL_malloc(l);
-- i2d_ASN1_SET_OF_ASN1_OCTET_STRING(oset, &tmp, i2d_ASN1_OCTET_STRING,
-- V_ASN1_SET, V_ASN1_UNIVERSAL, IS_SET);
-- ASN1_OCTET_STRING_free(ostr);
-- sk_ASN1_OCTET_STRING_free(oset);
--
-- SpcAttributeTypeAndOptionalValue *aval = SpcAttributeTypeAndOptionalValue_new();
-- aval->type = OBJ_txt2obj((phtype == NID_sha1) ? SPC_PE_IMAGE_PAGE_HASHES_V1 : SPC_PE_IMAGE_PAGE_HASHES_V2, 1);
-- aval->value = ASN1_TYPE_new();
-- aval->value->type = V_ASN1_SET;
-- aval->value->value.set = ASN1_STRING_new();
-- ASN1_STRING_set(aval->value->value.set, p, l);
-- OPENSSL_free(p);
--
-- STACK_OF(SpcAttributeTypeAndOptionalValue) *aset = sk_SpcAttributeTypeAndOptionalValue_new_null();
-- sk_SpcAttributeTypeAndOptionalValue_push(aset, aval);
-- l = i2d_SpcAttributeTypeAndOptionalValue(aset, NULL, i2d_SpcAttributeTypeAndOptionalValue,
-- V_ASN1_SET, V_ASN1_UNIVERSAL, IS_SET);
-- tmp = p = OPENSSL_malloc(l);
-- l = i2d_SpcAttributeTypeAndOptionalValue(aset, &tmp, i2d_SpcAttributeTypeAndOptionalValue,
-- V_ASN1_SET, V_ASN1_UNIVERSAL, IS_SET);
-- sk_SpcAttributeTypeAndOptionalValue_free(aset);
-- SpcAttributeTypeAndOptionalValue_free(aval);
--
-- SpcSerializedObject *so = SpcSerializedObject_new();
-- M_ASN1_OCTET_STRING_set(so->classId, classid_page_hash, sizeof(classid_page_hash));
-- M_ASN1_OCTET_STRING_set(so->serializedData, p, l);
-- OPENSSL_free(p);
--
-- SpcLink *link = SpcLink_new();
-- link->type = 1;
-- link->value.moniker = so;
-- return link;
--}
--
- static void get_indirect_data_blob(u_char **blob, int *len, const EVP_MD *md, file_type_t type,
-- int pagehash, char *indata, unsigned int peheader, int pe32plus,
-+ char *indata, unsigned int peheader, int pe32plus,
- unsigned int sigpos)
- {
- static const unsigned char msistr[] = {
-@@ -1024,14 +950,7 @@ static void get_indirect_data_blob(u_char **blob, int *len, const EVP_MD *md, fi
- } else if (type == FILE_TYPE_PE) {
- SpcPeImageData *pid = SpcPeImageData_new();
- ASN1_BIT_STRING_set(pid->flags, (unsigned char*)"0", 0);
-- if (pagehash) {
-- int phtype = NID_sha1;
-- if (EVP_MD_size(md) > EVP_MD_size(EVP_sha1()))
-- phtype = NID_sha256;
-- pid->file = get_page_hash_link(phtype, indata, peheader, pe32plus, sigpos);
-- } else {
-- pid->file = get_obsolete_link();
-- }
-+ pid->file = get_obsolete_link();
- l = i2d_SpcPeImageData(pid, NULL);
- p = OPENSSL_malloc(l);
- i2d_SpcPeImageData(pid, &p);
-@@ -1046,7 +965,7 @@ static void get_indirect_data_blob(u_char **blob, int *len, const EVP_MD *md, fi
- ASN1_INTEGER_set(si->d, 0);
- ASN1_INTEGER_set(si->e, 0);
- ASN1_INTEGER_set(si->f, 0);
-- M_ASN1_OCTET_STRING_set(si->string, msistr, sizeof(msistr));
-+ ASN1_OCTET_STRING_set(si->string, msistr, sizeof(msistr));
- l = i2d_SpcSipInfo(si, NULL);
- p = OPENSSL_malloc(l);
- i2d_SpcSipInfo(si, &p);
-@@ -1068,7 +987,7 @@ static void get_indirect_data_blob(u_char **blob, int *len, const EVP_MD *md, fi
- hashlen = EVP_MD_size(md);
- hash = OPENSSL_malloc(hashlen);
- memset(hash, 0, hashlen);
-- M_ASN1_OCTET_STRING_set(idc->messageDigest->digest, hash, hashlen);
-+ ASN1_OCTET_STRING_set(idc->messageDigest->digest, hash, hashlen);
- OPENSSL_free(hash);
-
- *len = i2d_SpcIndirectDataContent(idc, NULL);
-@@ -1923,19 +1842,18 @@ static void calc_pe_digest(BIO *bio, const EVP_MD *md, unsigned char *mdbuf,
- unsigned int peheader, int pe32plus, unsigned int fileend)
- {
- static unsigned char bfb[16*1024*1024];
-- EVP_MD_CTX mdctx;
-+ EVP_MD_CTX *mdctx = EVP_MD_CTX_new();
-
-- EVP_MD_CTX_init(&mdctx);
-- EVP_DigestInit(&mdctx, md);
-+ EVP_DigestInit(mdctx, md);
-
- memset(mdbuf, 0, EVP_MAX_MD_SIZE);
-
- (void)BIO_seek(bio, 0);
- BIO_read(bio, bfb, peheader + 88);
-- EVP_DigestUpdate(&mdctx, bfb, peheader + 88);
-+ EVP_DigestUpdate(mdctx, bfb, peheader + 88);
- BIO_read(bio, bfb, 4);
- BIO_read(bio, bfb, 60+pe32plus*16);
-- EVP_DigestUpdate(&mdctx, bfb, 60+pe32plus*16);
-+ EVP_DigestUpdate(mdctx, bfb, 60+pe32plus*16);
- BIO_read(bio, bfb, 8);
-
- unsigned int n = peheader + 88 + 4 + 60+pe32plus*16 + 8;
-@@ -1946,11 +1864,12 @@ static void calc_pe_digest(BIO *bio, const EVP_MD *md, unsigned char *mdbuf,
- int l = BIO_read(bio, bfb, want);
- if (l <= 0)
- break;
-- EVP_DigestUpdate(&mdctx, bfb, l);
-+ EVP_DigestUpdate(mdctx, bfb, l);
- n += l;
- }
-
-- EVP_DigestFinal(&mdctx, mdbuf, NULL);
-+ EVP_DigestFinal(mdctx, mdbuf, NULL);
-+ EVP_MD_CTX_free(mdctx);
- }
-
-
-@@ -2019,16 +1938,15 @@ static unsigned char *calc_page_hash(char *indata, unsigned int peheader, int pe
- int phlen = pphlen * (3 + nsections + sigpos / pagesize);
- unsigned char *res = malloc(phlen);
- unsigned char *zeroes = calloc(pagesize, 1);
-- EVP_MD_CTX mdctx;
--
-- EVP_MD_CTX_init(&mdctx);
-- EVP_DigestInit(&mdctx, md);
-- EVP_DigestUpdate(&mdctx, indata, peheader + 88);
-- EVP_DigestUpdate(&mdctx, indata + peheader + 92, 60 + pe32plus*16);
-- EVP_DigestUpdate(&mdctx, indata + peheader + 160 + pe32plus*16, hdrsize - (peheader + 160 + pe32plus*16));
-- EVP_DigestUpdate(&mdctx, zeroes, pagesize - hdrsize);
-+ EVP_MD_CTX *mdctx = EVP_MD_CTX_new();
-+
-+ EVP_DigestInit(mdctx, md);
-+ EVP_DigestUpdate(mdctx, indata, peheader + 88);
-+ EVP_DigestUpdate(mdctx, indata + peheader + 92, 60 + pe32plus*16);
-+ EVP_DigestUpdate(mdctx, indata + peheader + 160 + pe32plus*16, hdrsize - (peheader + 160 + pe32plus*16));
-+ EVP_DigestUpdate(mdctx, zeroes, pagesize - hdrsize);
- memset(res, 0, 4);
-- EVP_DigestFinal(&mdctx, res + 4, NULL);
-+ EVP_DigestFinal(mdctx, res + 4, NULL);
-
- unsigned short sizeofopthdr = GET_UINT16_LE(indata + peheader + 20);
- char *sections = indata + peheader + 24 + sizeofopthdr;
-@@ -2040,18 +1958,20 @@ static unsigned char *calc_page_hash(char *indata, unsigned int peheader, int pe
- unsigned int l;
- for (l=0; l < rs; l+=pagesize, pi++) {
- PUT_UINT32_LE(ro + l, res + pi*pphlen);
-- EVP_DigestInit(&mdctx, md);
-+ EVP_DigestInit(mdctx, md);
- if (rs - l < pagesize) {
-- EVP_DigestUpdate(&mdctx, indata + ro + l, rs - l);
-- EVP_DigestUpdate(&mdctx, zeroes, pagesize - (rs - l));
-+ EVP_DigestUpdate(mdctx, indata + ro + l, rs - l);
-+ EVP_DigestUpdate(mdctx, zeroes, pagesize - (rs - l));
- } else {
-- EVP_DigestUpdate(&mdctx, indata + ro + l, pagesize);
-+ EVP_DigestUpdate(mdctx, indata + ro + l, pagesize);
- }
-- EVP_DigestFinal(&mdctx, res + pi*pphlen + 4, NULL);
-+ EVP_DigestFinal(mdctx, res + pi*pphlen + 4, NULL);
- }
- lastpos = ro + rs;
- sections += 40;
- }
-+ EVP_MD_CTX_free(mdctx);
-+ mdctx = NULL;
- PUT_UINT32_LE(lastpos, res + pi*pphlen);
- memset(res + pi*pphlen + 4, 0, EVP_MD_size(md));
- pi++;
-@@ -2413,7 +2333,7 @@ int main(int argc, char **argv)
- int nturl = 0, ntsurl = 0;
- int addBlob = 0;
- u_char *p = NULL;
-- int ret = 0, i, len = 0, jp = -1, pe32plus = 0, comm = 0, pagehash = 0;
-+ int ret = 0, i, len = 0, jp = -1, pe32plus = 0, comm = 0;
- unsigned int tmp, peheader = 0, padlen = 0;
- off_t filesize, fileend, sigfilesize, sigfileend, outdatasize;
- file_type_t type;
-@@ -2448,13 +2368,6 @@ int main(int argc, char **argv)
- ERR_load_crypto_strings();
- OPENSSL_add_all_algorithms_conf();
-
-- /* create some MS Authenticode OIDS we need later on */
-- if (!OBJ_create(SPC_STATEMENT_TYPE_OBJID, NULL, NULL) ||
-- !OBJ_create(SPC_MS_JAVA_SOMETHING, NULL, NULL) ||
-- !OBJ_create(SPC_SP_OPUS_INFO_OBJID, NULL, NULL) ||
-- !OBJ_create(SPC_NESTED_SIGNATURE_OBJID, NULL, NULL))
-- DO_EXIT_0("Failed to add objects\n");
--
- md = EVP_sha1();
-
- if (argc > 1) {
-@@ -2531,8 +2444,6 @@ int main(int argc, char **argv)
- readpass = *(++argv);
- } else if ((cmd == CMD_SIGN) && !strcmp(*argv, "-comm")) {
- comm = 1;
-- } else if ((cmd == CMD_SIGN) && !strcmp(*argv, "-ph")) {
-- pagehash = 1;
- } else if ((cmd == CMD_SIGN) && !strcmp(*argv, "-n")) {
- if (--argc < 1) usage(argv0);
- desc = *(++argv);
-@@ -3243,7 +3154,7 @@ int main(int argc, char **argv)
- p7x = NULL;
- }
-
-- get_indirect_data_blob(&p, &len, md, type, pagehash, indata, peheader, pe32plus, fileend);
-+ get_indirect_data_blob(&p, &len, md, type, indata, peheader, pe32plus, fileend);
- len -= EVP_MD_size(md);
- memcpy(buf, p, len);
- OPENSSL_free(p);
---
-2.34.1
-
=====================================
projects/osslsigncode/build
=====================================
@@ -4,11 +4,10 @@ distdir=$(pwd)/dist
mkdir -p $distdir/[% project %]
tar xf [% project %]-[% c('version') %].tar.gz
cd [% project %]-[% c('version') %]
-patch -p1 < ../0001-Make-code-work-with-OpenSSL-1.1.patch
-patch -p1 < ../timestamping.patch
-./autogen.sh
-./configure --prefix=/[% project %]
+mkdir build
+cd build
+cmake -DCMAKE_INSTALL_PREFIX=/[% project %] -S ..
make
make DESTDIR=$distdir install
=====================================
projects/osslsigncode/config
=====================================
@@ -1,20 +1,16 @@
# vim: filetype=yaml sw=2
version: '[% c("git_hash").substr(0, 12) %]'
git_url: https://github.com/mtrojnar/osslsigncode
-git_hash: e72a1937d1a13e87074e4584f012f13e03fc1d64
+git_hash: d6f94d71f731868a3df86c6e0b8094da0c1412ed
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
container:
use_container: 0
var:
deps:
- - autoconf
- - libtool
- - pkg-config
+ - cmake
- libssl-dev
- libcurl4-openssl-dev
input_files:
- - filename: 0001-Make-code-work-with-OpenSSL-1.1.patch
- - filename: timestamping.patch
- filename: '[% c("var/srcfile") %]'
enable: '[% c("var/no-git") %]'
=====================================
projects/osslsigncode/timestamping.patch deleted
=====================================
@@ -1,56 +0,0 @@
-From 28b384e77fa0d4dd38751a0c72ab5976d2e38f75 Mon Sep 17 00:00:00 2001
-From: Georg Koppen <gk(a)torproject.org>
-Date: Fri, 5 Feb 2016 09:23:10 +0000
-Subject: [PATCH] Allow timestamping with the 'add' command
-
-
-diff --git a/osslsigncode.c b/osslsigncode.c
-index 32e37c8..2978c02 100644
---- a/osslsigncode.c
-+++ b/osslsigncode.c
-@@ -2556,16 +2556,16 @@ int main(int argc, char **argv)
- if (--argc < 1) usage(argv0);
- url = *(++argv);
- #ifdef ENABLE_CURL
-- } else if ((cmd == CMD_SIGN) && !strcmp(*argv, "-t")) {
-+ } else if ((cmd == CMD_SIGN || cmd == CMD_ADD) && !strcmp(*argv, "-t")) {
- if (--argc < 1) usage(argv0);
- turl[nturl++] = *(++argv);
-- } else if ((cmd == CMD_SIGN) && !strcmp(*argv, "-ts")) {
-+ } else if ((cmd == CMD_SIGN || cmd == CMD_ADD) && !strcmp(*argv, "-ts")) {
- if (--argc < 1) usage(argv0);
- tsurl[ntsurl++] = *(++argv);
-- } else if ((cmd == CMD_SIGN) && !strcmp(*argv, "-p")) {
-+ } else if ((cmd == CMD_SIGN || cmd == CMD_ADD) && !strcmp(*argv, "-p")) {
- if (--argc < 1) usage(argv0);
- proxy = *(++argv);
-- } else if ((cmd == CMD_SIGN) && !strcmp(*argv, "-noverifypeer")) {
-+ } else if ((cmd == CMD_SIGN || cmd == CMD_ADD) && !strcmp(*argv, "-noverifypeer")) {
- noverifypeer = 1;
- #endif
- } else if ((cmd == CMD_SIGN || cmd == CMD_ADD) && !strcmp(*argv, "-addUnauthenticatedBlob")) {
---
-2.7.0
-
-
-From 8159546dfa270da0e3512dcba983ce15029111d0 Mon Sep 17 00:00:00 2001
-From: Georg Koppen <gk(a)torproject.org>
-Date: Sat, 11 Apr 2020 05:50:36 +0000
-Subject: [PATCH] fixup! Allow timestamping with the 'add' command
-
-
-diff --git a/osslsigncode.c b/osslsigncode.c
-index 3797458..4f4b897 100644
---- a/osslsigncode.c
-+++ b/osslsigncode.c
-@@ -2447,7 +2447,7 @@ int main(int argc, char **argv)
- } else if ((cmd == CMD_SIGN) && !strcmp(*argv, "-n")) {
- if (--argc < 1) usage(argv0);
- desc = *(++argv);
-- } else if ((cmd == CMD_SIGN) && !strcmp(*argv, "-h")) {
-+ } else if ((cmd == CMD_SIGN || cmd == CMD_ADD) && !strcmp(*argv, "-h")) {
- if (--argc < 1) usage(argv0);
- ++argv;
- if (!strcmp(*argv, "md5")) {
---
-2.26.0
=====================================
tools/signing/authenticode-timestamping.sh
=====================================
@@ -35,7 +35,7 @@ set -e
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source "$script_dir/functions"
-osslsigncode_file="$script_dir/../../out/osslsigncode/osslsigncode-e72a1937d1a1-25066d.tar.gz"
+osslsigncode_file="$script_dir/../../out/osslsigncode/osslsigncode-d6f94d71f731-3a61fb.tar.gz"
test -f "$osslsigncode_file" ||
exit_error "$osslsigncode_file is missing." \
=====================================
tools/signing/do-all-signing
=====================================
@@ -17,9 +17,9 @@ echo
test -f "$steps_dir/linux-signer-signmars.done" ||
read -sp "Enter nssdb7 (mar signing) passphrase: " NSSPASS
echo
-#test -f "$steps_dir/linux-signer-authenticode-signing.done" ||
-# read -sp "Enter windows authenticode (yubihsm) passphrase: " YUBIPASS
-#echo
+test -f "$steps_dir/linux-signer-authenticode-signing.done" ||
+ read -sp "Enter windows authenticode passphrase: " YUBIPASS
+echo
test -f "$steps_dir/linux-signer-gpg-sign.done" ||
read -sp "Enter gpg passphrase: " GPG_PASS
echo
@@ -193,10 +193,10 @@ do_step dmg2mar
do_step sync-scripts-to-linux-signer
do_step linux-signer-signmars
do_step sync-after-signmars
-#do_step linux-signer-authenticode-signing
-#do_step sync-after-authenticode-signing
-#do_step authenticode-timestamping
-#do_step sync-after-authenticode-timestamping
+do_step linux-signer-authenticode-signing
+do_step sync-after-authenticode-signing
+do_step authenticode-timestamping
+do_step sync-after-authenticode-timestamping
do_step hash_signed_bundles
do_step sync-after-hash
do_step linux-signer-gpg-sign
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/compare/…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/compare/…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-13.0-1] 12 commits: fixup! Bug 40933: Add tor-launcher functionality
by richard (@richard) 08 Jun '23
by richard (@richard) 08 Jun '23
08 Jun '23
richard pushed to branch tor-browser-102.12.0esr-13.0-1 at The Tor Project / Applications / Tor Browser
Commits:
2bf330d2 by Pier Angelo Vendrame at 2023-06-08T14:56:19+02:00
fixup! Bug 40933: Add tor-launcher functionality
Added a newnym function
- - - - -
ed24f026 by Pier Angelo Vendrame at 2023-06-08T14:56:20+02:00
fixup! Bug 10760: Integrate TorButton to TorBrowser core
Bug 40938: Moving the domain isolator out of torbutton
- - - - -
4e063afe by Arthur Edelstein at 2023-06-08T14:56:20+02:00
Bug 3455: Add DomainIsolator, for isolating circuit by domain.
Add an XPCOM component that registers a ProtocolProxyChannelFilter
which sets the username/password for each web request according to
url bar domain.
Bug 9442: Add New Circuit button
Bug 13766: Set a 10 minute circuit dirty timeout for the catch-all circ.
Bug 19206: Include a 128 bit random tag as part of the domain isolator nonce.
Bug 19206: Clear out the domain isolator state on `New Identity`.
Bug 21201.2: Isolate by firstPartyDomain from OriginAttributes
Bug 21745: Fix handling of catch-all circuit
Bug 41741: Refactor the domain isolator and new circuit
- - - - -
9018b2cd by Pier Angelo Vendrame at 2023-06-08T14:56:20+02:00
fixup! Bug 3455: Add DomainIsolator, for isolating circuit by domain.
Refactors to the old JS code.
- - - - -
47c03bfc by Pier Angelo Vendrame at 2023-06-08T14:56:21+02:00
fixup! Bug 3455: Add DomainIsolator, for isolating circuit by domain.
Manage NEWNYM here.
- - - - -
d33564dd by Pier Angelo Vendrame at 2023-06-08T14:56:21+02:00
fixup! Bug 3455: Add DomainIsolator, for isolating circuit by domain.
Removed the XPCOM definition of the domain isolator.
- - - - -
ae68e4b5 by Pier Angelo Vendrame at 2023-06-08T14:56:22+02:00
fixup! Bug 10760: Integrate TorButton to TorBrowser core
Extract the new identity button from torbutton
- - - - -
322c6af1 by Pier Angelo Vendrame at 2023-06-08T14:56:22+02:00
fixup! Bug 3455: Add DomainIsolator, for isolating circuit by domain.
Actually added the new circuit button.
- - - - -
1ba65aa4 by Pier Angelo Vendrame at 2023-06-08T14:56:22+02:00
fixup! Bug 41600: Add a tor circuit display panel.
Use the new domain isolator interface.
- - - - -
beec825e by Pier Angelo Vendrame at 2023-06-08T14:56:23+02:00
fixup! Bug 40209: Implement Basic Crypto Safety
Use the new domain isolator interface
- - - - -
e3478fc9 by Pier Angelo Vendrame at 2023-06-08T14:56:23+02:00
fixup! Bug 10760: Integrate TorButton to TorBrowser core
Remove string changes from Torbutton.
We will add them back in the TorStrings commit.
- - - - -
cf8bb1df by Pier Angelo Vendrame at 2023-06-08T14:56:24+02:00
fixup! Add TorStrings module for localization
Add our DTDs where needed.
These changes were originally in the torbutton commit, but I think they
are better fit here, with all the strings files.
- - - - -
15 changed files:
- browser/actors/CryptoSafetyParent.jsm
- browser/base/content/appmenu-viewcache.inc.xhtml
- browser/base/content/browser-menubar.inc
- browser/base/content/browser-sets.inc
- browser/base/content/browser.js
- browser/base/content/navigator-toolbox.inc.xhtml
- browser/components/torcircuit/content/torCircuitPanel.js
- + toolkit/components/tor-launcher/TorDomainIsolator.jsm
- toolkit/components/tor-launcher/TorProtocolService.jsm
- toolkit/components/tor-launcher/TorStartupService.jsm
- toolkit/components/tor-launcher/moz.build
- toolkit/torbutton/chrome/content/torbutton.js
- − toolkit/torbutton/components/domain-isolator.js
- toolkit/torbutton/jar.mn
- toolkit/torbutton/modules/utils.js
Changes:
=====================================
browser/actors/CryptoSafetyParent.jsm
=====================================
@@ -12,6 +12,12 @@ const { XPCOMUtils } = ChromeUtils.import(
"resource://gre/modules/XPCOMUtils.jsm"
);
+ChromeUtils.defineModuleGetter(
+ this,
+ "TorDomainIsolator",
+ "resource://gre/modules/TorDomainIsolator.jsm"
+);
+
XPCOMUtils.defineLazyGetter(this, "cryptoSafetyBundle", () => {
return Services.strings.createBundle(
"chrome://browser/locale/cryptoSafetyPrompt.properties"
@@ -75,7 +81,11 @@ class CryptoSafetyParent extends JSWindowActorParent {
);
if (buttonPressed === 0) {
- this.browsingContext.topChromeWindow.torbutton_new_circuit();
+ const { browsingContext } = this.manager;
+ const browser = browsingContext.embedderElement;
+ if (browser) {
+ TorDomainIsolator.newCircuitForBrowser(browser.ownerGlobal.gBrowser);
+ }
}
}
}
=====================================
browser/base/content/appmenu-viewcache.inc.xhtml
=====================================
@@ -63,9 +63,9 @@
key="new-identity-key"/>
<toolbarbutton id="appMenuNewCircuit"
class="subviewbutton"
- key="torbutton-new-circuit-key"
+ key="new-circuit-key"
label="&torbutton.context_menu.new_circuit_sentence_case;"
- oncommand="torbutton_new_circuit();"/>
+ oncommand="TorDomainIsolator.newCircuitForBrowser(gBrowser);"/>
<toolbarseparator/>
<toolbarbutton id="appMenu-bookmarks-button"
class="subviewbutton subviewbutton-nav"
=====================================
browser/base/content/browser-menubar.inc
=====================================
@@ -33,9 +33,9 @@
key="new-identity-key"/>
<menuitem id="menu_newCircuit"
accesskey="&torbutton.context_menu.new_circuit_key;"
- key="torbutton-new-circuit-key"
+ key="new-circuit-key"
label="&torbutton.context_menu.new_circuit;"
- oncommand="torbutton_new_circuit();"/>
+ oncommand="TorDomainIsolator.newCircuitForBrowser(gBrowser);"/>
<menuseparator/>
<menuitem id="menu_openLocation"
hidden="true"
=====================================
browser/base/content/browser-sets.inc
=====================================
@@ -389,5 +389,5 @@
internal="true"/>
#endif
<key id="new-identity-key" modifiers="accel shift" key="U" oncommand="NewIdentityButton.onCommand(event)"/>
- <key id="torbutton-new-circuit-key" modifiers="accel shift" key="L" oncommand="torbutton_new_circuit()"/>
+ <key id="new-circuit-key" modifiers="accel shift" key="L" oncommand="TorDomainIsolator.newCircuitForBrowser(gBrowser)"/>
</keyset>
=====================================
browser/base/content/browser.js
=====================================
@@ -82,6 +82,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
TorConnect: "resource:///modules/TorConnect.jsm",
TorConnectState: "resource:///modules/TorConnect.jsm",
TorConnectTopics: "resource:///modules/TorConnect.jsm",
+ TorDomainIsolator: "resource://gre/modules/TorDomainIsolator.jsm",
Translation: "resource:///modules/translation/TranslationParent.jsm",
UITour: "resource:///modules/UITour.jsm",
UpdateUtils: "resource://gre/modules/UpdateUtils.jsm",
=====================================
browser/base/content/navigator-toolbox.inc.xhtml
=====================================
@@ -569,7 +569,7 @@
<toolbarbutton id="new-circuit-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&torbutton.context_menu.new_circuit;"
- oncommand="torbutton_new_circuit();"
+ oncommand="TorDomainIsolator.newCircuitForBrowser(gBrowser);"
tooltiptext="&torbutton.context_menu.new_circuit;"/>
<toolbarbutton id="fullscreen-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
=====================================
browser/components/torcircuit/content/torCircuitPanel.js
=====================================
@@ -193,7 +193,7 @@ var gTorCircuitPanel = {
document
.getElementById("tor-circuit-new-circuit")
.addEventListener("command", () => {
- torbutton_new_circuit();
+ TorDomainIsolator.newCircuitForBrowser(gBrowser);
// And hide.
// NOTE: focus should return to the toolbar button, which we expect to
// remain visible during reload.
@@ -415,20 +415,14 @@ var gTorCircuitPanel = {
*/
_updateCurrentBrowser(matchingCredentials = null) {
const browser = gBrowser.selectedBrowser;
- const { getDomainForBrowser } = ChromeUtils.import(
- "resource://torbutton/modules/utils.js"
- );
- const domain = getDomainForBrowser(browser);
+ const domain = TorDomainIsolator.getDomainForBrowser(browser);
// We choose the currentURI, which matches what is shown in the URL bar and
// will match up with the domain.
// In contrast, documentURI corresponds to the shown page. E.g. it could
// point to "about:certerror".
const scheme = browser.currentURI?.scheme;
- const domainIsolator = Cc["@torproject.org/domain-isolator;1"].getService(
- Ci.nsISupports
- ).wrappedJSObject;
- let credentials = domainIsolator.getSocksProxyCredentials(
+ let credentials = TorDomainIsolator.getSocksProxyCredentials(
domain,
browser.contentPrincipal.originAttributes.userContextId
);
=====================================
toolkit/components/tor-launcher/TorDomainIsolator.jsm
=====================================
@@ -0,0 +1,362 @@
+// A component for Tor Browser that puts requests from different
+// first party domains on separate Tor circuits.
+
+var EXPORTED_SYMBOLS = ["TorDomainIsolator"];
+
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+ "resource://gre/modules/XPCOMUtils.jsm"
+);
+const { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm");
+
+Cu.importGlobalProperties(["crypto"]);
+
+XPCOMUtils.defineLazyServiceGetters(this, {
+ ProtocolProxyService: [
+ "@mozilla.org/network/protocol-proxy-service;1",
+ "nsIProtocolProxyService",
+ ],
+});
+
+ChromeUtils.defineModuleGetter(
+ this,
+ "TorProtocolService",
+ "resource://gre/modules/TorProtocolService.jsm"
+);
+
+const logger = new ConsoleAPI({
+ prefix: "TorDomainIsolator",
+ maxLogLevel: "warn",
+ maxLogLevelPref: "browser.tordomainisolator.loglevel",
+});
+
+// The string to use instead of the domain when it is not known.
+const CATCHALL_DOMAIN = "--unknown--";
+
+// The preference to observe, to know whether isolation should be enabled or
+// disabled.
+const NON_TOR_PROXY_PREF = "extensions.torbutton.use_nontor_proxy";
+
+// The topic of new identity, to observe to cleanup all the nonces.
+const NEW_IDENTITY_TOPIC = "new-identity-requested";
+
+class TorDomainIsolatorImpl {
+ // A mutable map that records what nonce we are using for each domain.
+ #noncesForDomains = new Map();
+
+ // A mutable map that records what nonce we are using for each tab container.
+ #noncesForUserContextId = new Map();
+
+ // A bool that controls if we use SOCKS auth for isolation or not.
+ #isolationEnabled = true;
+
+ // Specifies when the current catch-all circuit was first used
+ #catchallDirtySince = Date.now();
+
+ /**
+ * Initialize the domain isolator.
+ * This function will setup the proxy filter that injects the credentials and
+ * register some observers.
+ */
+ init() {
+ logger.info("Setup circuit isolation by domain and user context");
+
+ if (Services.prefs.getBoolPref(NON_TOR_PROXY_PREF)) {
+ this.#isolationEnabled = false;
+ }
+ this.#setupProxyFilter();
+
+ Services.prefs.addObserver(NON_TOR_PROXY_PREF, this);
+ Services.obs.addObserver(this, NEW_IDENTITY_TOPIC);
+ }
+
+ /**
+ * Removes the observers added in the initialization.
+ */
+ uninit() {
+ Services.prefs.removeObserver(NON_TOR_PROXY_PREF, this);
+ Services.obs.removeObserver(this, NEW_IDENTITY_TOPIC);
+ }
+
+ enable() {
+ logger.trace("Domain isolation enabled");
+ this.#isolationEnabled = true;
+ }
+
+ disable() {
+ logger.trace("Domain isolation disabled");
+ this.#isolationEnabled = false;
+ }
+
+ /**
+ * Return the credentials to use as username and password for the SOCKS proxy,
+ * given a certain domain and userContextId. Optionally, create them.
+ *
+ * @param firstPartyDomain The first party domain associated to the requests
+ * @param userContextId The context ID associated to the request
+ * @param create Whether to create the nonce, if it is not available
+ * @return Either the credential, or null if we do not have them and create is
+ * false.
+ */
+ getSocksProxyCredentials(firstPartyDomain, userContextId, create = false) {
+ if (!this.#noncesForDomains.has(firstPartyDomain)) {
+ if (!create) {
+ return null;
+ }
+ const nonce = this.#nonce();
+ logger.info(`New nonce for first party ${firstPartyDomain}: ${nonce}`);
+ this.#noncesForDomains.set(firstPartyDomain, nonce);
+ }
+ if (!this.#noncesForUserContextId.has(userContextId)) {
+ if (!create) {
+ return null;
+ }
+ const nonce = this.#nonce();
+ logger.info(`New nonce for userContextId ${userContextId}: ${nonce}`);
+ this.#noncesForUserContextId.set(userContextId, nonce);
+ }
+ return {
+ username: this.#makeUsername(firstPartyDomain, userContextId),
+ password:
+ this.#noncesForDomains.get(firstPartyDomain) +
+ this.#noncesForUserContextId.get(userContextId),
+ };
+ }
+
+ /**
+ * Create a new nonce for the FP domain of the selected browser and reload the
+ * tab with a new circuit.
+ *
+ * @param browser Should be the gBrowser from the context of the caller
+ */
+ newCircuitForBrowser(browser) {
+ const firstPartyDomain = getDomainForBrowser(browser.selectedBrowser);
+ this.#newCircuitForDomain(firstPartyDomain);
+ // TODO: How to properly handle the user context? Should we use
+ // (domain, userContextId) pairs, instead of concatenating nonces?
+ browser.reloadWithFlags(Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE);
+ }
+
+ /**
+ * Clear the isolation state cache, forcing new circuits to be used for all
+ * subsequent requests.
+ */
+ clearIsolation() {
+ logger.trace("Clearing isolation nonces.");
+
+ // Per-domain and per contextId nonces are stored in maps, so simply clear
+ // them.
+ this.#noncesForDomains.clear();
+ this.#noncesForUserContextId.clear();
+
+ // Force a rotation on the next catch-all circuit use by setting the
+ // creation time to the epoch.
+ this.#catchallDirtySince = 0;
+ }
+
+ async observe(subject, topic, data) {
+ if (topic === "nsPref:changed" && data === NON_TOR_PROXY_PREF) {
+ if (Services.prefs.getBoolPref(NON_TOR_PROXY_PREF)) {
+ this.disable();
+ } else {
+ this.enable();
+ }
+ } else if (topic === NEW_IDENTITY_TOPIC) {
+ logger.info(
+ "New identity has been requested, clearing isolation tokens."
+ );
+ this.clearIsolation();
+ try {
+ await TorProtocolService.newnym();
+ } catch (e) {
+ logger.error("Could not send the newnym command", e);
+ // TODO: What UX to use here? See tor-browser#41708
+ }
+ }
+ }
+
+ /**
+ * Setup a filter that for every HTTPChannel, replaces the default SOCKS proxy
+ * with one that authenticates to the SOCKS server (the tor client process)
+ * with a username (the first party domain and userContextId) and a nonce
+ * password.
+ * Tor provides a separate circuit for each username+password combination.
+ */
+ #setupProxyFilter() {
+ const filterFunction = (aChannel, aProxy) => {
+ if (!this.#isolationEnabled) {
+ return aProxy;
+ }
+ try {
+ const channel = aChannel.QueryInterface(Ci.nsIChannel);
+ let firstPartyDomain =
+ channel.loadInfo.originAttributes.firstPartyDomain;
+ const userContextId = channel.loadInfo.originAttributes.userContextId;
+ if (firstPartyDomain === "") {
+ firstPartyDomain = CATCHALL_DOMAIN;
+ if (Date.now() - this.#catchallDirtySince > 1000 * 10 * 60) {
+ logger.info(
+ "tor catchall circuit has been dirty for over 10 minutes. Rotating."
+ );
+ this.#newCircuitForDomain(CATCHALL_DOMAIN);
+ this.#catchallDirtySince = Date.now();
+ }
+ }
+ const replacementProxy = this.#applySocksProxyCredentials(
+ aProxy,
+ firstPartyDomain,
+ userContextId
+ );
+ logger.debug(
+ `Requested ${channel.URI.spec} via ${replacementProxy.username}:${replacementProxy.password}`
+ );
+ return replacementProxy;
+ } catch (e) {
+ logger.error("Error while setting a new proxy", e);
+ return null;
+ }
+ };
+
+ ProtocolProxyService.registerChannelFilter(
+ {
+ applyFilter(aChannel, aProxy, aCallback) {
+ aCallback.onProxyFilterResult(filterFunction(aChannel, aProxy));
+ },
+ },
+ 0
+ );
+ }
+
+ /**
+ * Takes a proxyInfo object (originalProxy) and returns a new proxyInfo
+ * object with the same properties, except the username is set to the
+ * the domain and userContextId, and the password is a nonce.
+ */
+ #applySocksProxyCredentials(originalProxy, domain, userContextId) {
+ const proxy = originalProxy.QueryInterface(Ci.nsIProxyInfo);
+ const { username, password } = this.getSocksProxyCredentials(
+ domain,
+ userContextId,
+ true
+ );
+ return ProtocolProxyService.newProxyInfoWithAuth(
+ "socks",
+ proxy.host,
+ proxy.port,
+ username,
+ password,
+ "", // aProxyAuthorizationHeader
+ "", // aConnectionIsolationKey
+ proxy.flags,
+ proxy.failoverTimeout,
+ proxy.failoverProxy
+ );
+ }
+
+ /**
+ * Combine the needed data into a username for the proxy.
+ */
+ #makeUsername(domain, userContextId) {
+ if (!domain) {
+ domain = CATCHALL_DOMAIN;
+ }
+ return `${domain}:${userContextId}`;
+ }
+
+ /**
+ * Generate a new 128 bit random tag.
+ *
+ * Strictly speaking both using a cryptographic entropy source and using 128
+ * bits of entropy for the tag are likely overkill, as correct behavior only
+ * depends on how unlikely it is for there to be a collision.
+ */
+ #nonce() {
+ return Array.from(crypto.getRandomValues(new Uint8Array(16)), byte =>
+ byte.toString(16).padStart(2, "0")
+ ).join("");
+ }
+
+ /**
+ * Re-generate the nonce for a certain domain.
+ */
+ #newCircuitForDomain(domain) {
+ if (!domain) {
+ domain = CATCHALL_DOMAIN;
+ }
+ this.#noncesForDomains.set(domain, this.#nonce());
+ logger.info(
+ `New domain isolation for ${domain}: ${this.#noncesForDomains.get(
+ domain
+ )}`
+ );
+ }
+
+ /**
+ * Re-generate the nonce for a userContextId.
+ *
+ * Currently, this function is not hooked to anything.
+ */
+ #newCircuitForUserContextId(userContextId) {
+ this.#noncesForUserContextId.set(userContextId, this.#nonce());
+ logger.info(
+ `New container isolation for ${userContextId}: ${this.#noncesForUserContextId.get(
+ userContextId
+ )}`
+ );
+ }
+}
+
+/**
+ * Get the first party domain for a certain browser.
+ *
+ * @param browser The browser to get the FP-domain for.
+ *
+ * Please notice that it should be gBrowser.selectedBrowser, because
+ * browser.documentURI is the actual shown page, and might be an error page.
+ * In this case, we rely on currentURI, which for gBrowser is an alias of
+ * gBrowser.selectedBrowser.currentURI.
+ * See browser/base/content/tabbrowser.js and tor-browser#31562.
+ */
+function getDomainForBrowser(browser) {
+ let fpd = browser.contentPrincipal.originAttributes.firstPartyDomain;
+
+ // Bug 31562: For neterror or certerror, get the original URL from
+ // browser.currentURI and use it to calculate the firstPartyDomain.
+ const knownErrors = [
+ "about:neterror",
+ "about:certerror",
+ "about:httpsonlyerror",
+ ];
+ const { documentURI } = browser;
+ if (
+ documentURI &&
+ documentURI.schemeIs("about") &&
+ knownErrors.some(x => documentURI.spec.startsWith(x))
+ ) {
+ const knownSchemes = ["http", "https"];
+ const currentURI = browser.currentURI;
+ if (currentURI && knownSchemes.some(x => currentURI.schemeIs(x))) {
+ try {
+ fpd = Services.eTLD.getBaseDomainFromHost(currentURI.host);
+ } catch (e) {
+ if (
+ e.result === Cr.NS_ERROR_HOST_IS_IP_ADDRESS ||
+ e.result === Cr.NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS
+ ) {
+ fpd = currentURI.host;
+ } else {
+ logger.error(
+ `Failed to get first party domain for host ${currentURI.host}`,
+ e
+ );
+ }
+ }
+ }
+ }
+
+ return fpd;
+}
+
+const TorDomainIsolator = new TorDomainIsolatorImpl();
+// Reduce global vars pollution
+TorDomainIsolator.getDomainForBrowser = getDomainForBrowser;
=====================================
toolkit/components/tor-launcher/TorProtocolService.jsm
=====================================
@@ -4,6 +4,7 @@
var EXPORTED_SYMBOLS = ["TorProtocolService"];
+const { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm");
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm");
ChromeUtils.defineModuleGetter(
@@ -11,9 +12,6 @@ ChromeUtils.defineModuleGetter(
"FileUtils",
"resource://gre/modules/FileUtils.jsm"
);
-const { XPCOMUtils } = ChromeUtils.import(
- "resource://gre/modules/XPCOMUtils.jsm"
-);
Cu.importGlobalProperties(["crypto"]);
@@ -45,18 +43,9 @@ const TorTopics = Object.freeze({
ProcessRestarted: "TorProcessRestarted",
});
-// Logger adapted from CustomizableUI.jsm
-XPCOMUtils.defineLazyGetter(this, "logger", () => {
- const { ConsoleAPI } = ChromeUtils.import(
- "resource://gre/modules/Console.jsm"
- );
- // TODO: Use a preference to set the log level.
- const consoleOptions = {
- // maxLogLevel: "warn",
- maxLogLevel: "all",
- prefix: "TorProtocolService",
- };
- return new ConsoleAPI(consoleOptions);
+const logger = new ConsoleAPI({
+ maxLogLevel: "warn",
+ prefix: "TorProtocolService",
});
// Manage the connection to tor's control port, to update its settings and query
@@ -194,6 +183,10 @@ const TorProtocolService = {
TorMonitorService.retrieveBootstrapStatus();
},
+ async newnym() {
+ return this.sendCommand("SIGNAL NEWNYM");
+ },
+
// TODO: transform the following 4 functions in getters. At the moment they
// are also used in torbutton.
=====================================
toolkit/components/tor-launcher/TorStartupService.jsm
=====================================
@@ -33,6 +33,12 @@ ChromeUtils.defineModuleGetter(
"resource:///modules/TorSettings.jsm"
);
+ChromeUtils.defineModuleGetter(
+ this,
+ "TorDomainIsolator",
+ "resource://gre/modules/TorDomainIsolator.jsm"
+);
+
/* Browser observer topis */
const BrowserTopics = Object.freeze({
ProfileAfterChange: "profile-after-change",
@@ -67,12 +73,16 @@ class TorStartupService {
TorSettings.init();
TorConnect.init();
+ TorDomainIsolator.init();
+
gInited = true;
}
_uninit() {
Services.obs.removeObserver(this, BrowserTopics.QuitApplicationGranted);
+ TorDomainIsolator.uninit();
+
// Close any helper connection first...
TorProtocolService.uninit();
// ... and only then closes the event monitor connection, which will cause
=====================================
toolkit/components/tor-launcher/moz.build
=====================================
@@ -1,5 +1,6 @@
EXTRA_JS_MODULES += [
"TorBootstrapRequest.jsm",
+ "TorDomainIsolator.jsm",
"TorLauncherUtil.jsm",
"TorMonitorService.jsm",
"TorParsers.jsm",
=====================================
toolkit/torbutton/chrome/content/torbutton.js
=====================================
@@ -1,6 +1,5 @@
// window globals
var torbutton_init;
-var torbutton_new_circuit;
(() => {
// Bug 1506 P1-P5: This is the main Torbutton overlay file. Much needs to be
@@ -16,9 +15,7 @@ var torbutton_new_circuit;
let {
unescapeTorString,
- getDomainForBrowser,
torbutton_log,
- torbutton_get_property_string,
} = ChromeUtils.import("resource://torbutton/modules/utils.js");
let { configureControlPortModule, wait_for_controller } = ChromeUtils.import(
"resource://torbutton/modules/tor-control-port.js"
@@ -46,32 +43,22 @@ var torbutton_new_circuit;
// in a component, not the XUL overlay.
var torbutton_unique_pref_observer = {
register() {
- this.forced_ua = false;
- m_tb_prefs.addObserver("extensions.torbutton", this);
- m_tb_prefs.addObserver("browser.privatebrowsing.autostart", this);
- m_tb_prefs.addObserver("javascript", this);
+ Services.prefs.addObserver("browser.privatebrowsing.autostart", this);
},
unregister() {
- m_tb_prefs.removeObserver("extensions.torbutton", this);
- m_tb_prefs.removeObserver("browser.privatebrowsing.autostart", this);
- m_tb_prefs.removeObserver("javascript", this);
+ Services.prefs.removeObserver("browser.privatebrowsing.autostart", this);
},
// topic: what event occurred
// subject: what nsIPrefBranch we're observing
// data: which pref has been changed (relative to subject)
observe(subject, topic, data) {
- if (topic !== "nsPref:changed") {
- return;
- }
- switch (data) {
- case "browser.privatebrowsing.autostart":
- torbutton_update_disk_prefs();
- break;
- case "extensions.torbutton.use_nontor_proxy":
- torbutton_use_nontor_proxy();
- break;
+ if (
+ topic === "nsPref:changed" &&
+ data === "browser.privatebrowsing.autostart"
+ ) {
+ torbutton_update_disk_prefs();
}
},
};
@@ -113,62 +100,6 @@ var torbutton_new_circuit;
},
};
- var torbutton_new_identity_observers = {
- register() {
- Services.obs.addObserver(this, "new-identity-requested");
- },
-
- observe(aSubject, aTopic, aData) {
- if (aTopic !== "new-identity-requested") {
- return;
- }
-
- // Clear the domain isolation state.
- torbutton_log(3, "Clearing domain isolator");
- const domainIsolator = Cc["@torproject.org/domain-isolator;1"].getService(
- Ci.nsISupports
- ).wrappedJSObject;
- domainIsolator.clearIsolation();
-
- torbutton_log(3, "New Identity: Sending NEWNYM");
- // We only support TBB for newnym.
- if (
- !m_tb_control_pass ||
- (!m_tb_control_ipc_file && !m_tb_control_port)
- ) {
- const warning = torbutton_get_property_string(
- "torbutton.popup.no_newnym"
- );
- torbutton_log(
- 5,
- "Torbutton cannot safely newnym. It does not have access to the Tor Control Port."
- );
- window.alert(warning);
- } else {
- const warning = torbutton_get_property_string(
- "torbutton.popup.no_newnym"
- );
- torbutton_send_ctrl_cmd("SIGNAL NEWNYM")
- .then(res => {
- if (!res) {
- torbutton_log(
- 5,
- "Torbutton was unable to request a new circuit from Tor"
- );
- window.alert(warning);
- }
- })
- .catch(e => {
- torbutton_log(
- 5,
- "Torbutton was unable to request a new circuit from Tor " + e
- );
- window.alert(warning);
- });
- }
- },
- };
-
// Bug 1506 P2-P4: This code sets some version variables that are irrelevant.
// It does read out some important environment variables, though. It is
// called once per browser window.. This might belong in a component.
@@ -258,8 +189,6 @@ var torbutton_new_circuit;
true
);
- torbutton_new_identity_observers.register();
-
torbutton_log(3, "init completed");
};
@@ -374,36 +303,6 @@ var torbutton_new_circuit;
return response;
}
- // Bug 1506 P4: Needed for New IP Address
- torbutton_new_circuit = function() {
- let firstPartyDomain = getDomainForBrowser(gBrowser.selectedBrowser);
-
- let domainIsolator = Cc["@torproject.org/domain-isolator;1"].getService(
- Ci.nsISupports
- ).wrappedJSObject;
-
- domainIsolator.newCircuitForDomain(firstPartyDomain);
-
- gBrowser.reloadWithFlags(Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE);
- };
-
- /* Called when we switch the use_nontor_proxy pref in either direction.
- *
- * Enables/disables domain isolation and then does new identity
- */
- function torbutton_use_nontor_proxy() {
- let domainIsolator = Cc["@torproject.org/domain-isolator;1"].getService(
- Ci.nsISupports
- ).wrappedJSObject;
-
- if (m_tb_prefs.getBoolPref("extensions.torbutton.use_nontor_proxy")) {
- // Disable domain isolation
- domainIsolator.disableIsolation();
- } else {
- domainIsolator.enableIsolation();
- }
- }
-
async function torbutton_do_tor_check() {
let checkSvc = Cc["@torproject.org/torbutton-torCheckService;1"].getService(
Ci.nsISupports
=====================================
toolkit/torbutton/components/domain-isolator.js deleted
=====================================
@@ -1,312 +0,0 @@
-// # domain-isolator.js
-// A component for TorBrowser that puts requests from different
-// first party domains on separate tor circuits.
-
-// This file is written in call stack order (later functions
-// call earlier functions). The code file can be processed
-// with docco.js to provide clear documentation.
-
-// ### Abbreviations
-
-const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
-const { XPCOMUtils } = ChromeUtils.import(
- "resource://gre/modules/XPCOMUtils.jsm"
-);
-
-XPCOMUtils.defineLazyModuleGetters(this, {
- ComponentUtils: "resource://gre/modules/ComponentUtils.jsm",
-});
-
-// Make the logger available.
-let logger = Cc["@torproject.org/torbutton-logger;1"].getService(Ci.nsISupports)
- .wrappedJSObject;
-
-// Import crypto object (FF 37+).
-Cu.importGlobalProperties(["crypto"]);
-
-// ## mozilla namespace.
-// Useful functionality for interacting with Mozilla services.
-let mozilla = {};
-
-// __mozilla.protocolProxyService__.
-// Mozilla's protocol proxy service, useful for managing proxy connections made
-// by the browser.
-mozilla.protocolProxyService = Cc[
- "@mozilla.org/network/protocol-proxy-service;1"
-].getService(Ci.nsIProtocolProxyService);
-
-// __mozilla.registerProxyChannelFilter(filterFunction, positionIndex)__.
-// Registers a proxy channel filter with the Mozilla Protocol Proxy Service,
-// which will help to decide the proxy to be used for a given channel.
-// The filterFunction should expect two arguments, (aChannel, aProxy),
-// where aProxy is the proxy or list of proxies that would be used by default
-// for the given channel, and should return a new Proxy or list of Proxies.
-mozilla.registerProxyChannelFilter = function(filterFunction, positionIndex) {
- let proxyFilter = {
- applyFilter(aChannel, aProxy, aCallback) {
- aCallback.onProxyFilterResult(filterFunction(aChannel, aProxy));
- },
- };
- mozilla.protocolProxyService.registerChannelFilter(
- proxyFilter,
- positionIndex
- );
-};
-
-// ## tor functionality.
-let tor = {};
-
-// __tor.noncesForDomains__.
-// A mutable map that records what nonce we are using for each domain.
-tor.noncesForDomains = new Map();
-
-// __tor.noncesForUserContextId__.
-// A mutable map that records what nonce we are using for each tab container.
-tor.noncesForUserContextId = new Map();
-
-// __tor.isolationEabled__.
-// A bool that controls if we use SOCKS auth for isolation or not.
-tor.isolationEnabled = true;
-
-// __tor.unknownDirtySince__.
-// Specifies when the current catch-all circuit was first used
-tor.unknownDirtySince = Date.now();
-
-tor.passwordForDomainAndUserContextId = function(
- domain,
- userContextId,
- create
-) {
- // Check if we already have a nonce. If not, possibly create one for this
- // domain and userContextId.
- if (!tor.noncesForDomains.has(domain)) {
- if (!create) {
- return null;
- }
- tor.noncesForDomains.set(domain, tor.nonce());
- }
- if (!tor.noncesForUserContextId.has(userContextId)) {
- if (!create) {
- return null;
- }
- tor.noncesForUserContextId.set(userContextId, tor.nonce());
- }
- return (
- tor.noncesForDomains.get(domain) +
- tor.noncesForUserContextId.get(userContextId)
- );
-};
-
-tor.usernameForDomainAndUserContextId = function(domain, userContextId) {
- return `${domain}:${userContextId}`;
-};
-
-// __tor.socksProxyCredentials(originalProxy, domain, userContextId)__.
-// Takes a proxyInfo object (originalProxy) and returns a new proxyInfo
-// object with the same properties, except the username is set to the
-// the domain and userContextId, and the password is a nonce.
-tor.socksProxyCredentials = function(originalProxy, domain, userContextId) {
- let proxy = originalProxy.QueryInterface(Ci.nsIProxyInfo);
- let proxyUsername = tor.usernameForDomainAndUserContextId(
- domain,
- userContextId
- );
- let proxyPassword = tor.passwordForDomainAndUserContextId(
- domain,
- userContextId,
- true
- );
- return mozilla.protocolProxyService.newProxyInfoWithAuth(
- "socks",
- proxy.host,
- proxy.port,
- proxyUsername,
- proxyPassword,
- "", // aProxyAuthorizationHeader
- "", // aConnectionIsolationKey
- proxy.flags,
- proxy.failoverTimeout,
- proxy.failoverProxy
- );
-};
-
-tor.nonce = function() {
- // Generate a new 128 bit random tag. Strictly speaking both using a
- // cryptographic entropy source and using 128 bits of entropy for the
- // tag are likely overkill, as correct behavior only depends on how
- // unlikely it is for there to be a collision.
- let tag = new Uint8Array(16);
- crypto.getRandomValues(tag);
-
- // Convert the tag to a hex string.
- let tagStr = "";
- for (let i = 0; i < tag.length; i++) {
- tagStr += (tag[i] >>> 4).toString(16);
- tagStr += (tag[i] & 0x0f).toString(16);
- }
-
- return tagStr;
-};
-
-tor.newCircuitForDomain = function(domain) {
- // Re-generate the nonce for the domain.
- if (domain === "") {
- domain = "--unknown--";
- }
- tor.noncesForDomains.set(domain, tor.nonce());
- logger.eclog(
- 3,
- `New domain isolation for ${domain}: ${tor.noncesForDomains.get(domain)}`
- );
-};
-
-tor.newCircuitForUserContextId = function(userContextId) {
- // Re-generate the nonce for the context.
- tor.noncesForUserContextId.set(userContextId, tor.nonce());
- logger.eclog(
- 3,
- `New container isolation for ${userContextId}: ${tor.noncesForUserContextId.get(
- userContextId
- )}`
- );
-};
-
-// __tor.clearIsolation()_.
-// Clear the isolation state cache, forcing new circuits to be used for all
-// subsequent requests.
-tor.clearIsolation = function() {
- // Per-domain and per contextId nonces are stored in maps, so simply clear them.
- tor.noncesForDomains.clear();
- tor.noncesForUserContextId.clear();
-
- // Force a rotation on the next catch-all circuit use by setting the creation
- // time to the epoch.
- tor.unknownDirtySince = 0;
-};
-
-// __tor.isolateCircuitsByDomain()__.
-// For every HTTPChannel, replaces the default SOCKS proxy with one that authenticates
-// to the SOCKS server (the tor client process) with a username (the first party domain
-// and userContextId) and a nonce password. Tor provides a separate circuit for each
-// username+password combination.
-tor.isolateCircuitsByDomain = function() {
- mozilla.registerProxyChannelFilter(function(aChannel, aProxy) {
- if (!tor.isolationEnabled) {
- return aProxy;
- }
- try {
- let channel = aChannel.QueryInterface(Ci.nsIChannel),
- firstPartyDomain = channel.loadInfo.originAttributes.firstPartyDomain,
- userContextId = channel.loadInfo.originAttributes.userContextId;
- if (firstPartyDomain === "") {
- firstPartyDomain = "--unknown--";
- if (Date.now() - tor.unknownDirtySince > 1000 * 10 * 60) {
- logger.eclog(
- 3,
- "tor catchall circuit has been dirty for over 10 minutes. Rotating."
- );
- tor.newCircuitForDomain("--unknown--");
- tor.unknownDirtySince = Date.now();
- }
- }
- let replacementProxy = tor.socksProxyCredentials(
- aProxy,
- firstPartyDomain,
- userContextId
- );
- logger.eclog(
- 3,
- `tor SOCKS: ${channel.URI.spec} via
- ${replacementProxy.username}:${replacementProxy.password}`
- );
- return replacementProxy;
- } catch (e) {
- logger.eclog(4, `tor domain isolator error: ${e.message}`);
- return null;
- }
- }, 0);
-};
-
-// ## XPCOM component construction.
-// Module specific constants
-const kMODULE_NAME = "TorBrowser Domain Isolator";
-const kMODULE_CONTRACTID = "@torproject.org/domain-isolator;1";
-const kMODULE_CID = Components.ID("e33fd6d4-270f-475f-a96f-ff3140279f68");
-
-// DomainIsolator object.
-function DomainIsolator() {
- this.wrappedJSObject = this;
-}
-
-// Firefox component requirements
-DomainIsolator.prototype = {
- QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
- classDescription: kMODULE_NAME,
- classID: kMODULE_CID,
- contractID: kMODULE_CONTRACTID,
- observe(subject, topic, data) {
- if (topic === "profile-after-change") {
- logger.eclog(3, "domain isolator: set up isolating circuits by domain");
-
- if (Services.prefs.getBoolPref("extensions.torbutton.use_nontor_proxy")) {
- tor.isolationEnabled = false;
- }
- tor.isolateCircuitsByDomain();
- }
- },
-
- newCircuitForDomain(domain) {
- tor.newCircuitForDomain(domain);
- },
-
- /**
- * Return the stored SOCKS proxy username and password for the given domain
- * and user context ID.
- *
- * @param {string} firstPartyDomain - The domain to lookup credentials for.
- * @param {integer} userContextId - The ID for the user context.
- *
- * @return {{ username: string, password: string }?} - The SOCKS credentials,
- * or null if none are found.
- */
- getSocksProxyCredentials(firstPartyDomain, userContextId) {
- if (firstPartyDomain == "") {
- firstPartyDomain = "--unknown--";
- }
- let proxyPassword = tor.passwordForDomainAndUserContextId(
- firstPartyDomain,
- userContextId,
- // Do not create a new entry if it does not exist.
- false
- );
- if (!proxyPassword) {
- return null;
- }
- return {
- username: tor.usernameForDomainAndUserContextId(
- firstPartyDomain,
- userContextId
- ),
- password: proxyPassword,
- };
- },
-
- enableIsolation() {
- tor.isolationEnabled = true;
- },
-
- disableIsolation() {
- tor.isolationEnabled = false;
- },
-
- clearIsolation() {
- tor.clearIsolation();
- },
-
- wrappedJSObject: null,
-};
-
-// Assign factory to global object.
-const NSGetFactory = XPCOMUtils.generateNSGetFactory
- ? XPCOMUtils.generateNSGetFactory([DomainIsolator])
- : ComponentUtils.generateNSGetFactory([DomainIsolator]);
=====================================
toolkit/torbutton/jar.mn
=====================================
@@ -43,9 +43,5 @@ torbutton.jar:
% component {f36d72c9-9718-4134-b550-e109638331d7} %components/torbutton-logger.js
% contract @torproject.org/torbutton-logger;1 {f36d72c9-9718-4134-b550-e109638331d7}
-% component {e33fd6d4-270f-475f-a96f-ff3140279f68} %components/domain-isolator.js
-% contract @torproject.org/domain-isolator;1 {e33fd6d4-270f-475f-a96f-ff3140279f68}
-
% category profile-after-change StartupObserver @torproject.org/startup-observer;1
-% category profile-after-change DomainIsolator @torproject.org/domain-isolator;1
% category profile-after-change DragDropFilter @torproject.org/torbutton-dragDropFilter;1
=====================================
toolkit/torbutton/modules/utils.js
=====================================
@@ -213,45 +213,6 @@ var unescapeTorString = function(str) {
return _torControl._strUnescape(str);
};
-var getFPDFromHost = hostname => {
- try {
- return Services.eTLD.getBaseDomainFromHost(hostname);
- } catch (e) {
- if (
- e.result == Cr.NS_ERROR_HOST_IS_IP_ADDRESS ||
- e.result == Cr.NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS
- ) {
- return hostname;
- }
- }
- return null;
-};
-
-// Assuming this is called with gBrowser.selectedBrowser
-var getDomainForBrowser = browser => {
- let fpd = browser.contentPrincipal.originAttributes.firstPartyDomain;
- // Bug 31562: For neterror or certerror, get the original URL from
- // browser.currentURI and use it to calculate the firstPartyDomain.
- let knownErrors = [
- "about:neterror",
- "about:certerror",
- "about:httpsonlyerror",
- ];
- let documentURI = browser.documentURI;
- if (
- documentURI &&
- documentURI.schemeIs("about") &&
- knownErrors.some(x => documentURI.spec.startsWith(x))
- ) {
- let knownSchemes = ["http", "https", "ftp"];
- let currentURI = browser.currentURI;
- if (currentURI && knownSchemes.some(x => currentURI.schemeIs(x))) {
- fpd = getFPDFromHost(currentURI.host) || fpd;
- }
- }
- return fpd;
-};
-
var m_tb_torlog = Cc["@torproject.org/torbutton-logger;1"].getService(
Ci.nsISupports
).wrappedJSObject;
@@ -310,7 +271,6 @@ let EXPORTED_SYMBOLS = [
"bindPrefAndInit",
"getEnv",
"getLocale",
- "getDomainForBrowser",
"getPrefValue",
"observe",
"showDialog",
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/2165eb…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/2165eb…
You're receiving this email because of your account on gitlab.torproject.org.
1
0