[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-128.3.0esr-14.0-1] Bug 42716: Disable unwanted about: pages

morgan (@morgan) git at gitlab.torproject.org
Tue Oct 1 20:32:56 UTC 2024



morgan pushed to branch tor-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser


Commits:
9921cbc8 by Morgan at 2024-10-01T20:31:28+00:00
Bug 42716: Disable unwanted about: pages

- - - - -


5 changed files:

- browser/components/about/AboutRedirector.cpp
- browser/components/about/components.conf
- docshell/base/nsAboutRedirector.cpp
- docshell/build/components.conf
- toolkit/content/jar.mn


Changes:

=====================================
browser/components/about/AboutRedirector.cpp
=====================================
@@ -91,9 +91,11 @@ static const RedirEntry kRedirMap[] = {
     {"rights", "chrome://global/content/aboutRights.xhtml",
      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
          nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI},
+#ifndef BASE_BROWSER_VERSION
     {"robots", "chrome://browser/content/aboutRobots.xhtml",
      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
          nsIAboutModule::ALLOW_SCRIPT},
+#endif
     {"rulesets", "chrome://browser/content/rulesets/aboutRulesets.html",
      nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
          nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS |


=====================================
browser/components/about/components.conf
=====================================
@@ -24,7 +24,7 @@ pages = [
     'reader',
     'restartrequired',
     'rights',
-    'robots',
+    # Removed 'robots'. tor-browser#42831.
     'rulesets',
     'sessionrestore',
     'settings',


=====================================
docshell/base/nsAboutRedirector.cpp
=====================================
@@ -135,8 +135,10 @@ static const RedirEntry kRedirMap[] = {
          nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
          nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS |
          nsIAboutModule::IS_SECURE_CHROME_UI},
+#ifndef BASE_BROWSER_VERSION
     {"mozilla", "chrome://global/content/mozilla.html",
      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT},
+#endif
 #if !defined(ANDROID) && !defined(XP_WIN)
     {"webauthn", "chrome://global/content/aboutWebauthn.html",
      nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI},
@@ -181,15 +183,17 @@ static const RedirEntry kRedirMap[] = {
     {"windows-messages", "chrome://global/content/aboutWindowsMessages.html",
      nsIAboutModule::ALLOW_SCRIPT},
 #endif
-#ifndef MOZ_GLEAN_ANDROID
+#ifdef MOZ_TELEMETRY_REPORTING
+#  ifndef MOZ_GLEAN_ANDROID
     {"glean", "chrome://global/content/aboutGlean.html",
-#  if !defined(NIGHTLY_BUILD) && defined(MOZILLA_OFFICIAL)
+#    if !defined(NIGHTLY_BUILD) && defined(MOZILLA_OFFICIAL)
      nsIAboutModule::HIDE_FROM_ABOUTABOUT |
-#  endif
+#    endif
          nsIAboutModule::ALLOW_SCRIPT},
-#endif
+#  endif
     {"telemetry", "chrome://global/content/aboutTelemetry.xhtml",
      nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI},
+#endif 
     {"torconnect", "chrome://global/content/torconnect/aboutTorConnect.html",
      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
          nsIAboutModule::URI_CAN_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT |
@@ -205,8 +209,10 @@ static const RedirEntry kRedirMap[] = {
     {"url-classifier", "chrome://global/content/aboutUrlClassifier.xhtml",
      nsIAboutModule::ALLOW_SCRIPT},
 #endif
+#ifdef MOZ_WEBRTC
     {"webrtc", "chrome://global/content/aboutwebrtc/aboutWebrtc.html",
      nsIAboutModule::ALLOW_SCRIPT},
+#endif
     {"crashparent", "about:blank", nsIAboutModule::HIDE_FROM_ABOUTABOUT},
     {"crashcontent", "about:blank",
      nsIAboutModule::HIDE_FROM_ABOUTABOUT |


=====================================
docshell/build/components.conf
=====================================
@@ -22,7 +22,7 @@ about_pages = [
     'logging',
     'logo',
     'memory',
-    'mozilla',
+    # Removed 'mozilla'. tor-browser#42831.
     'neterror',
     'networking',
     'performance',
@@ -30,22 +30,24 @@ about_pages = [
     'serviceworkers',
     'srcdoc',
     'support',
-    'telemetry',
     'torconnect',
     'translations',
     'tor',
-    'url-classifier',
-    'webrtc',
+    # Removed 'url-classifier'. tor-browser#42831.
 ]
 
 if defined('MOZ_CRASHREPORTER'):
     about_pages.append('crashes')
+if defined('MOZ_TELEMETRY_REPORTING'):
+    about_pages.append('telemetry')
+if defined('MOZ_WEBRTC'):
+    about_pages.append('webrtc')
 if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] != 'android':
     about_pages.append('profiles')
 if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] == 'windows':
     about_pages.append('third-party')
     about_pages.append('windows-messages')
-if not defined('MOZ_GLEAN_ANDROID'):
+if defined('MOZ_TELEMETRY_REPORTING') and not defined('MOZ_GLEAN_ANDROID'):
     about_pages.append('glean')
 if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] != 'android' and buildconfig.substs['MOZ_WIDGET_TOOLKIT'] != 'windows':
     about_pages.append('webauthn')


=====================================
toolkit/content/jar.mn
=====================================
@@ -23,6 +23,7 @@ toolkit.jar:
 #endif
    content/global/aboutServiceWorkers.js
    content/global/aboutServiceWorkers.xhtml
+#ifdef MOZ_WEBRTC
    content/global/aboutwebrtc/aboutWebrtc.css   (aboutwebrtc/aboutWebrtc.css)
    content/global/aboutwebrtc/aboutWebrtc.mjs    (aboutwebrtc/aboutWebrtc.mjs)
    content/global/aboutwebrtc/graph.mjs    (aboutwebrtc/graph.mjs)
@@ -31,16 +32,19 @@ toolkit.jar:
    content/global/aboutwebrtc/disclosure.mjs (aboutwebrtc/disclosure.mjs)
    content/global/aboutwebrtc/copyButton.mjs (aboutwebrtc/copyButton.mjs)
    content/global/aboutwebrtc/aboutWebrtc.html (aboutwebrtc/aboutWebrtc.html)
+#endif
    content/global/aboutSupport.js
 *  content/global/aboutSupport.xhtml
-#ifndef MOZ_GLEAN_ANDROID
+#ifdef MOZ_TELEMETRY_REPORTING
+#  ifndef MOZ_GLEAN_ANDROID
    content/global/aboutGlean.js
    content/global/aboutGlean.html
    content/global/aboutGlean.css
-#endif
+#  endif
    content/global/aboutTelemetry.js
    content/global/aboutTelemetry.xhtml
    content/global/aboutTelemetry.css
+#endif
    content/global/aboutUrlClassifier.js
    content/global/aboutUrlClassifier.xhtml
    content/global/aboutUrlClassifier.css



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/9921cbc874d9aec28c1efa343afc7a2259f0b28f

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/9921cbc874d9aec28c1efa343afc7a2259f0b28f
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20241001/d241c470/attachment-0001.htm>


More information about the tor-commits mailing list