[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser] 03/74: Bug 41117: using MOZ_PROXY_BYPASS_PROTECTION disable share menu on mac and windows, and restpre email link on mac



This is an automated email from the git hooks/post-receive script.

richard pushed a commit to branch tor-browser-102.4.0esr-12.0-2
in repository tor-browser.

commit 203abd974b9cf7b9ad7159e5b9b1b81316f18361
Author: Dan Ballard <dan@xxxxxxxxxxxx>
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.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits