[tbb-commits] [tor-browser] 15/90: Bug 41117: using MOZ_PROXY_BYPASS_PROTECTION disable share menu on mac and windows, and restpre email link on mac
gitolite role
git at cupani.torproject.org
Tue Nov 22 09:57:50 UTC 2022
This is an automated email from the git hooks/post-receive script.
richard pushed a commit to branch tor-browser-102.5.0esr-12.0-1
in repository tor-browser.
commit bbd4cabc8f45c03bb12aff142a896b4182d997be
Author: Dan Ballard <dan at mindstab.net>
AuthorDate: Wed Oct 12 12:54:59 2022 -0700
Bug 41117: using MOZ_PROXY_BYPASS_PROTECTION disable share menu on mac and windows, and restpre email link on mac
---
browser/base/content/browser-menubar.inc | 3 ++-
browser/base/content/browser.js | 4 ++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc
index 1adea92456c7..384f95203933 100644
--- a/browser/base/content/browser-menubar.inc
+++ b/browser/base/content/browser-menubar.inc
@@ -48,7 +48,8 @@
<menuitem id="menu_savePage"
key="key_savePage"
command="Browser:SavePage" data-l10n-id="menu-file-save-page"/>
-#ifndef XP_MACOSX
+# bug 41117 - don't allow sharing as there is a proxy bypass theoretical risk, so restore send link in that case
+#if !defined(XP_MACOSX) || defined(MOZ_PROXY_BYPASS_PROTECTION)
<menuitem id="menu_sendLink"
command="Browser:SendLink" data-l10n-id="menu-file-email-link"/>
#endif
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index 628c58cc2208..085df747026d 100644
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -4807,6 +4807,10 @@ let gShareUtils = {
* Updates a sharing item in a given menu, creating it if necessary.
*/
updateShareURLMenuItem(browser, insertAfterEl) {
+ if (!Services.prefs.getBoolPref("browser.share_menu.allow", false)) {
+ return false;
+ }
+
// We only support "share URL" on macOS and on Windows 10:
if (
AppConstants.platform != "macosx" &&
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the tbb-commits
mailing list