Pier Angelo Vendrame pushed to branch tor-browser-102.9.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
50201d24 by Pier Angelo Vendrame at 2023-03-31T17:43:49+02:00
fixup! Bug 10760: Integrate TorButton to TorBrowser core
Bug 40501: High CPU load after tor exits unexpectedly
When a peers (tor) disconnects, Firefox seems to keep the stream open,
and return 0 on available, rather than throwing.
So, as a matter of fact, we had a while trying to read 0 bytes without
any pause in _readLine, hence the 100% CPU usage.
- - - - -
1 changed file:
- toolkit/torbutton/modules/tor-control-port.js
Changes:
=====================================
toolkit/torbutton/modules/tor-control-port.js
=====================================
@@ -135,6 +135,18 @@ class AsyncSocket {
this.inputQueue.push({
onInputStreamReady: stream => {
try {
+ if (!this.scriptableInputStream.available()) {
+ // This means EOF, but not closed yet. However, arriving at EOF
+ // should be an error condition for us, since we are in a socket,
+ // and EOF should mean peer disconnected.
+ // If the stream has been closed, this function itself should
+ // throw.
+ reject(
+ new Error("onInputStreamReady called without available bytes.")
+ );
+ return;
+ }
+
// read our string from input stream
let str = this.scriptableInputStream.read(
this.scriptableInputStream.available()
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/50201d2…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/50201d2…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch maint-12.0 at The Tor Project / Applications / tor-browser-build
Commits:
1044b8c7 by Pier Angelo Vendrame at 2023-03-30T09:30:10+02:00
Bug 40822: --disable-reloc-section on NSIS stubs.
Out binutils version adds the reloc sections by default, but NSIS does
not work with them.
So, we need to pass a flag to disable them, otherwise users with
mandatory ASLR turned on will not be able to install Tor Browser.
- - - - -
3 changed files:
- projects/nsis/build
- projects/nsis/config
- + projects/nsis/no-reloc-section.diff
Changes:
=====================================
projects/nsis/build
=====================================
@@ -13,6 +13,12 @@ cd /var/tmp/build/nsis-[% c('version') %]-src
# only valid for the Windows linker. Therefore we add it using a patch
# to the cross-compilation part only. Still needed as of 3.06.1, see: #40090.
patch -p1 < $rootdir/no-insert-timestamp.patch
+# tor-browser-build#40822: NSIS adds a flag to tell it supports ASLR, but it
+# does so only to pass MS certifications. According to the NSIS forums, they
+# intended not to ship the .reloc to save space. But, according to the bug
+# tracker, binutils 2.36 started adding a .reloc section by default, and we need
+# to disable it with this patch.
+patch -p1 < $rootdir/no-reloc-section.diff
[% IF c("var/windows-x86_64") %]
# Seems like setting TARGET_ARCH is not enough so we need to patch build.cpp
=====================================
projects/nsis/config
=====================================
@@ -24,6 +24,7 @@ input_files:
URL: 'https://downloads.sourceforge.net/nsis/nsis-[% c("version") %]-src.tar.bz2'
sha256sum: a85270ad5386182abecb2470e3d7e9bec9fe4efd95210b13551cb386830d1e87
- filename: no-insert-timestamp.patch
+ - filename: no-reloc-section.diff
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
- name: zlib
=====================================
projects/nsis/no-reloc-section.diff
=====================================
@@ -0,0 +1,14 @@
+diff -Naur nsis-3.08-orig/SCons/Config/gnu nsis-3.08-src/SCons/Config/gnu
+--- nsis-3.08-orig/SCons/Config/gnu 2023-03-23 09:22:46.315471779 +0100
++++ nsis-3.08-src/SCons/Config/gnu 2023-03-23 09:24:05.260933879 +0100
+@@ -103,6 +103,10 @@
+ stub_env.Append(LINKFLAGS = ['$ALIGN_FLAG']) # 512 bytes align
+ stub_env.Append(LINKFLAGS = ['$MAP_FLAG']) # generate map file
+
++# https://sourceforge.net/p/nsis/bugs/1283/?limit=25#e303,
++# https://sourceforge.net/p/nsis/bugs/1283/?limit=25#e303/e90f
++stub_env.Append(LINKFLAGS = ['-Wl,--disable-reloc-section'])
++
+ conf = FlagsConfigure(stub_env)
+ conf.CheckCompileFlag('-fno-tree-loop-distribute-patterns') # GCC 10: Don't generate msvcrt!memmove calls (bug #1248)
+ conf.Finish()
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/1…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/1…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch base-browser-102.9.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
9bdd279c by Pier Angelo Vendrame at 2023-03-29T20:21:32+02:00
fixup! Bug 31740: Remove some unnecessary RemoteSettings instances
Bug 41704: Immediately return on remoteSettings.pollChanges
- - - - -
2 changed files:
- services/settings/remote-settings.js
- services/settings/servicesSettings.manifest
Changes:
=====================================
services/settings/remote-settings.js
=====================================
@@ -200,12 +200,17 @@ function remoteSettingsFunction() {
full = false,
} = {}) => {
// When running in full mode, we ignore last polling status.
- if (full) {
+ if (full || AppConstants.BASE_BROWSER_VERSION) {
gPrefs.clearUserPref(PREF_SETTINGS_SERVER_BACKOFF);
gPrefs.clearUserPref(PREF_SETTINGS_LAST_UPDATE);
gPrefs.clearUserPref(PREF_SETTINGS_LAST_ETAG);
}
+ if (AppConstants.BASE_BROWSER_VERSION) {
+ // tor-browser#41704: pollChanges is always online, so do not allow it.
+ return;
+ }
+
let pollTelemetryArgs = {
source: TELEMETRY_SOURCE_POLL,
trigger,
=====================================
services/settings/servicesSettings.manifest
=====================================
@@ -4,4 +4,4 @@ resource services-settings resource://gre/modules/services-settings/
# Schedule polling of remote settings changes
# (default 24H, max 72H)
# see syntax https://searchfox.org/mozilla-central/rev/cc280c4be94ff8cf64a27cc9b3d6831ff…
-category update-timer RemoteSettingsComponents @mozilla.org/services/settings;1,getService,services-settings-poll-changes,services.settings.poll_interval,86400,259200
+# category update-timer RemoteSettingsComponents @mozilla.org/services/settings;1,getService,services-settings-poll-changes,services.settings.poll_interval,86400,259200
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/9bdd279…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/9bdd279…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch tor-browser-102.9.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
285a88a1 by Pier Angelo Vendrame at 2023-03-29T19:46:17+02:00
fixup! Bug 31740: Remove some unnecessary RemoteSettings instances
Bug 41704: Immediately return on remoteSettings.pollChanges
- - - - -
2 changed files:
- services/settings/remote-settings.js
- services/settings/servicesSettings.manifest
Changes:
=====================================
services/settings/remote-settings.js
=====================================
@@ -200,12 +200,17 @@ function remoteSettingsFunction() {
full = false,
} = {}) => {
// When running in full mode, we ignore last polling status.
- if (full) {
+ if (full || AppConstants.BASE_BROWSER_VERSION) {
gPrefs.clearUserPref(PREF_SETTINGS_SERVER_BACKOFF);
gPrefs.clearUserPref(PREF_SETTINGS_LAST_UPDATE);
gPrefs.clearUserPref(PREF_SETTINGS_LAST_ETAG);
}
+ if (AppConstants.BASE_BROWSER_VERSION) {
+ // tor-browser#41704: pollChanges is always online, so do not allow it.
+ return;
+ }
+
let pollTelemetryArgs = {
source: TELEMETRY_SOURCE_POLL,
trigger,
=====================================
services/settings/servicesSettings.manifest
=====================================
@@ -4,4 +4,4 @@ resource services-settings resource://gre/modules/services-settings/
# Schedule polling of remote settings changes
# (default 24H, max 72H)
# see syntax https://searchfox.org/mozilla-central/rev/cc280c4be94ff8cf64a27cc9b3d6831ff…
-category update-timer RemoteSettingsComponents @mozilla.org/services/settings;1,getService,services-settings-poll-changes,services.settings.poll_interval,86400,259200
+# category update-timer RemoteSettingsComponents @mozilla.org/services/settings;1,getService,services-settings-poll-changes,services.settings.poll_interval,86400,259200
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/285a88a…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/285a88a…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch tor-browser-102.9.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
0a920be1 by Pier Angelo Vendrame at 2023-03-29T17:47:40+02:00
fixup! Add TorStrings module for localization
Restore the letterbox warning for 12.0
- - - - -
1 changed file:
- toolkit/torbutton/chrome/locale/en-US/torbutton.properties
Changes:
=====================================
toolkit/torbutton/chrome/locale/en-US/torbutton.properties
=====================================
@@ -115,3 +115,8 @@ torbutton.popup.no_newnym = Torbutton cannot safely give you a new identity. It
# Preferences for mobile: these strings are still referenced, but we should
# check whether this feature is still used
torbutton.security_settings.menu.title = Security Settings
+
+# The notification that appears when maximizing the browser with letterboxing disabled
+# TODO: This string is not needed as of 12.5a5, and has a replacement in Base Browser!
+# To be removed when 12.0 will not need new updates.
+torbutton.maximize_warning = Maximizing Tor Browser can allow websites to determine your monitor size, which can be used to track you. We recommend that you leave Tor Browser windows in their original default size.
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/0a920be…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/0a920be…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch base-browser-102.9.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
2ffae0ac by Pier Angelo Vendrame at 2023-03-29T16:58:54+02:00
fixup! Bug 41695: Warn on window maximization without letterboxing in RFPHelper module
Bug 41698
- - - - -
59f56195 by Pier Angelo Vendrame at 2023-03-29T16:58:55+02:00
fixup! Bug 41369: Improve Firefox language settings for multi-lingual packages
Bug 41698: Reword the recommendation badges in about:addons
We need to add a new commit for all base browser strings
- - - - -
6f98fb4c by Pier Angelo Vendrame at 2023-03-29T16:58:55+02:00
Base Browser strings
This commit adds all the strings needed by following Base Browser
patches.
- - - - -
a825810a by Pier Angelo Vendrame at 2023-03-29T16:58:55+02:00
Bug 41698: Reword the recommendation badges in about:addons
Firefox strings use { -brand-product-name }.
As a result, it seems that the fork is recommending extensions, whereas
AMO curators are doing that.
So, we replace the strings with custom ones that clarify that Mozilla is
recommending them.
We assign the strings with JS because our translation backend does not
support Fluent attributes, yet, but once it does, we should switch to
them, instead.
Upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1825033
- - - - -
3 changed files:
- browser/locales/en-US/browser/languageNotification.ftl
- toolkit/mozapps/extensions/content/aboutaddons.html
- toolkit/mozapps/extensions/content/aboutaddons.js
Changes:
=====================================
browser/locales/en-US/browser/languageNotification.ftl
=====================================
@@ -2,6 +2,13 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+# These strings are used by the Base Browser part of the changeset, not only for
+# the language notification.
+# TODO: Rename this file to make this clearer
+
+
+## Language notification
+
# $language is the language Tor Browser is displayed in (already translated)
language-notification-label-system = { -brand-short-name } has set your display language to { $language } based on your system’s language.
# This is shown when the system language is not supported, so we fall back to another language instead.
@@ -9,6 +16,15 @@ language-notification-label-system = { -brand-short-name } has set your display
language-notification-label = { -brand-short-name } has set your display language to { $language }.
language-notification-button = Change Language…
+
+## Fullscreen/maximization notification shown when letterboxing is disabled
+
basebrowser-rfp-maximize-warning-message = Maximizing the browser window can allow websites to determine your monitor size, which can be used to track you. We recommend that you leave browser windows in their original default size.
basebrowser-rfp-restore-window-size-button-label = Restore
basebrowser-rfp-restore-window-size-button-ak = R
+
+
+## Tooltip for the about:addons recommended badge
+
+basebrowser-addon-badge-recommended = Mozilla only recommends extensions that meet their standards for security and performance
+basebrowser-addon-badge-verified = Mozilla has reviewed this extension to meet their standards for security and performance
=====================================
toolkit/mozapps/extensions/content/aboutaddons.html
=====================================
@@ -24,6 +24,8 @@
<link rel="localization" href="toolkit/about/aboutAddons.ftl">
<link rel="localization" href="toolkit/about/abuseReports.ftl">
+ <link rel="localization" href="browser/languageNotification.ftl"/>
+
<!-- Defer scripts so all the templates are loaded by the time they run. -->
<script defer src="chrome://mozapps/content/extensions/aboutaddonsCommon.js"></script>
<script defer src="chrome://mozapps/content/extensions/abuse-reports.js"></script>
@@ -153,7 +155,6 @@
is="support-link"
support-page="add-on-badges"
utmcontent="promoted-addon-badge"
- data-l10n-id="addon-badge-recommended2"
hidden>
</a>
<a class="addon-badge addon-badge-line"
@@ -167,7 +168,6 @@
is="support-link"
support-page="add-on-badges"
utmcontent="promoted-addon-badge"
- data-l10n-id="addon-badge-verified2"
hidden>
</a>
<a class="addon-badge addon-badge-private-browsing-allowed"
=====================================
toolkit/mozapps/extensions/content/aboutaddons.js
=====================================
@@ -4885,6 +4885,29 @@ async function initialize() {
);
}
}
+
+ // At the moment we need to do this, because Weblate still does not support
+ // attributes in Fluent.
+ const [recommended, verified] = await document.l10n.formatValues([
+ { id: "basebrowser-addon-badge-recommended" },
+ { id: "basebrowser-addon-badge-verified" },
+ ]);
+
+ importTemplate("card");
+ _templates.card.content
+ .querySelector(".addon-badge-recommended")
+ .setAttribute("title", recommended);
+ _templates.card.content
+ .querySelector(".addon-badge-verified")
+ .setAttribute("title", verified);
+
+ // We also update any template copy that has already been created.
+ for (const badge of document.querySelectorAll(".addon-badge-recommended")) {
+ badge.setAttribute("title", recommended);
+ }
+ for (const badge of document.querySelectorAll(".addon-badge-verified")) {
+ badge.setAttribute("title", verified);
+ }
}
window.promiseInitialized = new Promise(resolve => {
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/9e31ce…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/9e31ce…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch tor-browser-102.9.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
9b87c73a by Pier Angelo Vendrame at 2023-03-29T16:56:32+02:00
fixup! Bug 41695: Warn on window maximization without letterboxing in RFPHelper module
Bug 41698
- - - - -
071ef206 by Pier Angelo Vendrame at 2023-03-29T16:56:49+02:00
fixup! Bug 41369: Improve Firefox language settings for multi-lingual packages
Bug 41698: Reword the recommendation badges in about:addons
We need to add a new commit for all base browser strings
- - - - -
35133d69 by Pier Angelo Vendrame at 2023-03-29T16:56:49+02:00
Base Browser strings
This commit adds all the strings needed by following Base Browser
patches.
- - - - -
663cd8e2 by Pier Angelo Vendrame at 2023-03-29T16:56:50+02:00
Bug 41698: Reword the recommendation badges in about:addons
Firefox strings use { -brand-product-name }.
As a result, it seems that the fork is recommending extensions, whereas
AMO curators are doing that.
So, we replace the strings with custom ones that clarify that Mozilla is
recommending them.
We assign the strings with JS because our translation backend does not
support Fluent attributes, yet, but once it does, we should switch to
them, instead.
Upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1825033
- - - - -
3 changed files:
- browser/locales/en-US/browser/languageNotification.ftl
- toolkit/mozapps/extensions/content/aboutaddons.html
- toolkit/mozapps/extensions/content/aboutaddons.js
Changes:
=====================================
browser/locales/en-US/browser/languageNotification.ftl
=====================================
@@ -2,6 +2,13 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+# These strings are used by the Base Browser part of the changeset, not only for
+# the language notification.
+# TODO: Rename this file to make this clearer
+
+
+## Language notification
+
# $language is the language Tor Browser is displayed in (already translated)
language-notification-label-system = { -brand-short-name } has set your display language to { $language } based on your system’s language.
# This is shown when the system language is not supported, so we fall back to another language instead.
@@ -9,6 +16,15 @@ language-notification-label-system = { -brand-short-name } has set your display
language-notification-label = { -brand-short-name } has set your display language to { $language }.
language-notification-button = Change Language…
+
+## Fullscreen/maximization notification shown when letterboxing is disabled
+
basebrowser-rfp-maximize-warning-message = Maximizing the browser window can allow websites to determine your monitor size, which can be used to track you. We recommend that you leave browser windows in their original default size.
basebrowser-rfp-restore-window-size-button-label = Restore
basebrowser-rfp-restore-window-size-button-ak = R
+
+
+## Tooltip for the about:addons recommended badge
+
+basebrowser-addon-badge-recommended = Mozilla only recommends extensions that meet their standards for security and performance
+basebrowser-addon-badge-verified = Mozilla has reviewed this extension to meet their standards for security and performance
=====================================
toolkit/mozapps/extensions/content/aboutaddons.html
=====================================
@@ -24,6 +24,8 @@
<link rel="localization" href="toolkit/about/aboutAddons.ftl">
<link rel="localization" href="toolkit/about/abuseReports.ftl">
+ <link rel="localization" href="browser/languageNotification.ftl"/>
+
<!-- Defer scripts so all the templates are loaded by the time they run. -->
<script defer src="chrome://mozapps/content/extensions/aboutaddonsCommon.js"></script>
<script defer src="chrome://mozapps/content/extensions/abuse-reports.js"></script>
@@ -153,7 +155,6 @@
is="support-link"
support-page="add-on-badges"
utmcontent="promoted-addon-badge"
- data-l10n-id="addon-badge-recommended2"
hidden>
</a>
<a class="addon-badge addon-badge-line"
@@ -167,7 +168,6 @@
is="support-link"
support-page="add-on-badges"
utmcontent="promoted-addon-badge"
- data-l10n-id="addon-badge-verified2"
hidden>
</a>
<a class="addon-badge addon-badge-private-browsing-allowed"
=====================================
toolkit/mozapps/extensions/content/aboutaddons.js
=====================================
@@ -4885,6 +4885,29 @@ async function initialize() {
);
}
}
+
+ // At the moment we need to do this, because Weblate still does not support
+ // attributes in Fluent.
+ const [recommended, verified] = await document.l10n.formatValues([
+ { id: "basebrowser-addon-badge-recommended" },
+ { id: "basebrowser-addon-badge-verified" },
+ ]);
+
+ importTemplate("card");
+ _templates.card.content
+ .querySelector(".addon-badge-recommended")
+ .setAttribute("title", recommended);
+ _templates.card.content
+ .querySelector(".addon-badge-verified")
+ .setAttribute("title", verified);
+
+ // We also update any template copy that has already been created.
+ for (const badge of document.querySelectorAll(".addon-badge-recommended")) {
+ badge.setAttribute("title", recommended);
+ }
+ for (const badge of document.querySelectorAll(".addon-badge-verified")) {
+ badge.setAttribute("title", verified);
+ }
}
window.promiseInitialized = new Promise(resolve => {
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/5a1faa…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/5a1faa…
You're receiving this email because of your account on gitlab.torproject.org.