Frank-Rainer Grahl 1 month ago
parent
commit
4829a66176

+ 31 - 0
comm-release/patches/1656564-fix-themes-browseURL-25320.patch

@@ -0,0 +1,31 @@
+# HG changeset patch
+# User Matt A. Tobin <email@mattatobin.com>
+# Date 1725300166 0
+# Node ID de79fb8a38d24ed25c0707c1437a7661e28e1e4d
+# Parent  d66e11f5dcb1381b40f2b98009e5c3bc7fae2841
+Bug 1656564 - Link to the complete SeaMonkey themes on the TB add-ons site. r=frg a=frg
+
+Lightweight themes are gone and the link showed only incompatible TB webext themes.
+
+diff --git a/suite/app/profile/suite-prefs.js b/suite/app/profile/suite-prefs.js
+--- a/suite/app/profile/suite-prefs.js
++++ b/suite/app/profile/suite-prefs.js
+@@ -620,17 +620,17 @@ pref("extensions.getAddons.cache.enabled
+ pref("extensions.getAddons.maxResults", 15);
+ pref("extensions.getAddons.get.url", "https://live.thunderbird.net/services.addons/api/v3/addons/search/?guid=%IDS%&lang=%LOCALE%");
+ pref("extensions.getAddons.getWithPerformance.url", "https://live.thunderbird.net/services.addons/api/v3/addons/search/?guid=%IDS%?src=seamonkey&appOS=%OS%&appVersion=%VERSION%&tMain=%TIME_MAIN%&tFirstPaint=%TIME_FIRST_PAINT%&tSessionRestored=%TIME_SESSION_RESTORED%");
+ pref("extensions.getAddons.compatOverides.url", "https://live.thunderbird.net/services.addons/api/v3/addons/compat-override/?guid=%IDS%&lang=%LOCALE%");
+ pref("extensions.getAddons.link.url", "https://addons.thunderbird.net/%LOCALE%/%APP%/");
+ pref("extensions.getAddons.recommended.url", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/api/%API_VERSION%/list/recommended/all/%MAX_RESULTS%/%OS%/%VERSION%?src=seamonkey");
+ pref("extensions.getAddons.search.browseURL", "https://addons.thunderbird.net/%LOCALE%/%APP%/search/?q=%TERMS%");
+ pref("extensions.getAddons.search.url", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/%OS%/%VERSION%/%COMPATIBILITY_MODE%?src=seamonkey");
+-pref("extensions.getAddons.themes.browseURL", "https://addons.thunderbird.net/%LOCALE%/thunderbird/themes/?src=seamonkey");
++pref("extensions.getAddons.themes.browseURL", "https://addons.thunderbird.net/%LOCALE%/%APP%/complete-themes/");
+ pref("extensions.getAddons.siteRegExp", "^https://.*addons\\.thunderbird\\.net");
+ pref("extensions.webservice.discoverURL", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/discovery/pane/%VERSION%/%OS%");
+ 
+ // Blocklist preferences
+ pref("extensions.blocklist.url", "https://live.thunderbird.net/blocklists.settings/v1/blocklist/3/%APP_ID%/%APP_VERSION%/%PRODUCT%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/%PING_COUNT%/%TOTAL_PING_COUNT%/%DAYS_SINCE_LAST_PING%/");
+ pref("extensions.blocklist.detailsURL", "https://live.thunderbird.net/blocked.cdn/");
+ pref("extensions.blocklist.itemURL", "https://live.thunderbird.net/blocked.cdn/%blockID%.html");
+ 

+ 1 - 0
comm-release/patches/series

@@ -2188,3 +2188,4 @@ TOP-1906540-mozdevice-removal-comm-25320.patch
 1564611-70a1.patch
 1564611-70a1.patch
 1913633-mar-channel-ids-25320.patch
 1913633-mar-channel-ids-25320.patch
 1897801-2-about-seamonkey-25320.patch
 1897801-2-about-seamonkey-25320.patch
+1656564-fix-themes-browseURL-25320.patch

+ 34 - 0
mozilla-release/patches/1737436-use-mozilla-compat-version-define-25320.patch

@@ -0,0 +1,34 @@
+# HG changeset patch
+# User Matt A. Tobin <email@mattatobin.com>
+# Date 1725062400 0
+# Node ID c131ef2f50f2dd25368ef716d23e030ad90688b1
+# Parent  48e3c94fcf0683ededcafb7cdcd392129c15c8b2
+Bug 1737436 - Use MOZILLA_COMPATVERSION instead of hardcoding the compat Firefox version. r=frg a=frg
+
+diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp
+--- a/netwerk/protocol/http/nsHttpHandler.cpp
++++ b/netwerk/protocol/http/nsHttpHandler.cpp
+@@ -466,19 +466,21 @@ nsHttpHandler::Init()
+         prefBranch->AddObserver(TCP_FAST_OPEN_STALLS_LIMIT, this, true);
+         prefBranch->AddObserver(TCP_FAST_OPEN_STALLS_IDLE, this, true);
+         prefBranch->AddObserver(TCP_FAST_OPEN_STALLS_TIMEOUT, this, true);
+         PrefsChanged(prefBranch, nullptr);
+     }
+ 
+     nsHttpChannelAuthProvider::InitializePrefs();
+ 
+-    mMisc.AssignLiteral("rv:91.0");
++    mMisc.AssignLiteral("rv:");
++    mMisc.AppendLiteral(MOZILLA_COMPATVERSION);   
+ 
+-    mCompatFirefox.AssignLiteral("Firefox/91.0");
++    mCompatFirefox.AssignLiteral("Firefox/");
++    mCompatFirefox.AppendLiteral(MOZILLA_COMPATVERSION);
+ 
+     nsCOMPtr<nsIXULAppInfo> appInfo =
+         do_GetService("@mozilla.org/xre/app-info;1");
+ 
+     mAppName.AssignLiteral(MOZ_APP_UA_NAME);
+     if (mAppName.Length() == 0 && appInfo) {
+         // Try to get the UA name from appInfo, falling back to the name
+         appInfo->GetUAName(mAppName);

+ 171 - 0
mozilla-release/patches/1862395-incorrect-version-resistfingerprinting-v2-25320.patch

@@ -0,0 +1,171 @@
+# HG changeset patch
+# User Matt A. Tobin <email@mattatobin.com>
+# Date 1725062400 0
+# Node ID 48e3c94fcf0683ededcafb7cdcd392129c15c8b2
+# Parent  37256db90390003aedfbee9ce08dc1d3273692ee
+Bug 1862395 - Use a compatibility milestone version for resisting fingerpriting. r=frg a=frg
+
+ Previously the application version was used when spoofing the UA. This was not
+ compatible with SeaMonkeys version scheme.
+
+diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
+--- a/build/moz.configure/init.configure
++++ b/build/moz.configure/init.configure
+@@ -1085,16 +1085,17 @@ def js_option(*args, **kwargs):
+ # The logic works like this:
+ # - if we have "a1" in GRE_MILESTONE, we're building Nightly (define NIGHTLY_BUILD)
+ # - otherwise, if we have "a" in GRE_MILESTONE, we're building Nightly or Aurora
+ # - otherwise, we're building Release/Beta (define RELEASE_OR_BETA)
+ @depends(check_build_environment, '--help')
+ @imports(_from='__builtin__', _import='open')
+ @imports('re')
+ def milestone(build_env, _):
++    # Handle the Mozilla Milestone
+     milestone_path = os.path.join(build_env.topsrcdir,
+                                   'config',
+                                   'milestone.txt')
+     with open(milestone_path, 'r') as fh:
+         milestone = fh.read().splitlines()[-1]
+ 
+     is_nightly = is_release_or_beta = None
+ 
+@@ -1102,23 +1103,37 @@ def milestone(build_env, _):
+         is_nightly = True
+     elif 'a' not in milestone:
+         is_release_or_beta = True
+ 
+     major_version = milestone.split('.')[0]
+     m = re.search(r"([ab]\d+)", milestone)
+     ab_patch = m.group(1) if m else ''
+ 
++    # Handle the Mozilla Compatibility Milestone
++    # This is set in build/milestone-compat.txt and should be a valid
++    # late-model Firefox ESR Version.
++    milestone_compat_path = os.path.join(build_env.topsrcdir,
++                                         'config',
++                                         'milestone-compat.txt')
++    with open(milestone_compat_path, 'r') as fh:
++        milestone_compat = fh.read().splitlines()[-1]
++
++    # In case this file becomes more useful than just XX.0 just grab the
++    # major version part.
++    milestone_compat = milestone_compat.split('.')[0]
++
+     # Only expose the major version milestone in the UA string and hide the
+     # patch leve (bugs 572659 and 870868).
+     #
+     # Only expose major milestone and alpha version in the symbolversion
+     # string; as the name suggests, we use it for symbol versioning on Linux.
+     return namespace(version=milestone,
+                      uaversion='%s.0' % major_version,
++                     compatversion='%s.0' % milestone_compat,
+                      symbolversion='%s%s' % (major_version, ab_patch),
+                      is_nightly=is_nightly,
+                      is_release_or_beta=is_release_or_beta)
+ 
+ 
+ set_config('GRE_MILESTONE', milestone.version)
+ set_config('NIGHTLY_BUILD', milestone.is_nightly)
+ set_define('NIGHTLY_BUILD', milestone.is_nightly)
+@@ -1126,16 +1141,20 @@ set_config('RELEASE_OR_BETA', milestone.
+ set_define('RELEASE_OR_BETA', milestone.is_release_or_beta)
+ add_old_configure_assignment('RELEASE_OR_BETA',
+                              milestone.is_release_or_beta)
+ set_define('MOZILLA_VERSION', depends(milestone)(lambda m: '"%s"' % m.version))
+ set_config('MOZILLA_VERSION', milestone.version)
+ set_define('MOZILLA_VERSION_U', milestone.version)
+ set_define('MOZILLA_UAVERSION', depends(milestone)(lambda m: '"%s"' % m.uaversion))
+ set_config('MOZILLA_SYMBOLVERSION', milestone.symbolversion)
++
++set_define('MOZILLA_COMPATVERSION_U', milestone.compatversion)
++set_define('MOZILLA_COMPATVERSION', depends(milestone)(lambda m: '"%s"' % m.compatversion))
++
+ # JS configure still wants to look at these.
+ add_old_configure_assignment('MOZILLA_VERSION', milestone.version)
+ add_old_configure_assignment('MOZILLA_SYMBOLVERSION', milestone.symbolversion)
+ 
+ # The app update channel is 'default' when not supplied. The value is used in
+ # the application's confvars.sh (and is made available to a project specific
+ # moz.configure).
+ option('--enable-update-channel',
+diff --git a/config/milestone-compat.txt b/config/milestone-compat.txt
+new file mode 100644
+--- /dev/null
++++ b/config/milestone-compat.txt
+@@ -0,0 +1,9 @@
++# Holds the Compatibility milestone.
++# Should be in the format of
++#
++# XX.0
++#
++# Referenced by build/moz.configure/init.configure.
++#--------------------------------------------------------
++
++91.0
+diff --git a/toolkit/components/resistfingerprinting/nsRFPService.cpp b/toolkit/components/resistfingerprinting/nsRFPService.cpp
+--- a/toolkit/components/resistfingerprinting/nsRFPService.cpp
++++ b/toolkit/components/resistfingerprinting/nsRFPService.cpp
+@@ -274,56 +274,24 @@ nsRFPService::GetSpoofedUserAgent(nsACSt
+ {
+   // This function generates the spoofed value of User Agent.
+   // We spoof the values of the platform and Firefox version, which could be
+   // used as fingerprinting sources to identify individuals.
+   // Reference of the format of User Agent:
+   // https://developer.mozilla.org/en-US/docs/Web/API/NavigatorID/userAgent
+   // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent
+ 
+-  nsresult rv;
+-  nsCOMPtr<nsIXULAppInfo> appInfo =
+-    do_GetService("@mozilla.org/xre/app-info;1", &rv);
+-  NS_ENSURE_SUCCESS(rv, rv);
+-
+-  nsAutoCString appVersion;
+-  rv = appInfo->GetVersion(appVersion);
+-  NS_ENSURE_SUCCESS(rv, rv);
+-
+-  // The browser version will be spoofed as the last ESR version.
+-  // By doing so, the anonymity group will cover more versions instead of one
+-  // version.
+-  uint32_t firefoxVersion = appVersion.ToInteger(&rv);
+-  NS_ENSURE_SUCCESS(rv, rv);
++  // XXXTobin: The function has been simplified to send the a late-model
++  // common-ish compatibility esr version which is far more useful to
++  // SeaMonkey users than fuzzy math.
++  userAgent.Assign(nsPrintfCString(
++    "Mozilla/5.0 (%s; rv:%s) Gecko/%s Firefox/%s",
++    SPOOFED_UA_OS, MOZILLA_COMPATVERSION, LEGACY_BUILD_ID, MOZILLA_COMPATVERSION));
+ 
+-  // Starting from Firefox 10, Firefox ESR was released once every seven
+-  // Firefox releases, e.g. Firefox 10, 17, 24, 31, and so on.
+-  // We infer the last and closest ESR version based on this rule.
+-  nsCOMPtr<nsIXULRuntime> runtime =
+-    do_GetService("@mozilla.org/xre/runtime;1", &rv);
+-  NS_ENSURE_SUCCESS(rv, rv);
+-
+-  nsAutoCString updateChannel;
+-  rv = runtime->GetDefaultUpdateChannel(updateChannel);
+-  NS_ENSURE_SUCCESS(rv, rv);
+-
+-  // If we are running in Firefox ESR, determine whether the formula of ESR
+-  // version has changed.  Once changed, we must update the formula in this
+-  // function.
+-  if (updateChannel.EqualsLiteral("esr")) {
+-    MOZ_ASSERT(((firefoxVersion % 7) == 3),
+-      "Please udpate ESR version formula in nsRFPService.cpp");
+-  }
+-
+-  uint32_t spoofedVersion = firefoxVersion - ((firefoxVersion - 3) % 7);
+-  userAgent.Assign(nsPrintfCString(
+-    "Mozilla/5.0 (%s; rv:%d.0) Gecko/%s Firefox/%d.0",
+-    SPOOFED_UA_OS, spoofedVersion, LEGACY_BUILD_ID, spoofedVersion));
+-
+-  return rv;
++  return NS_OK;
+ }
+ 
+ nsresult
+ nsRFPService::Init()
+ {
+   MOZ_ASSERT(NS_IsMainThread());
+ 
+   nsresult rv;

+ 2 - 0
mozilla-release/patches/series

@@ -7316,3 +7316,5 @@ TOP-NOBUG-blockquad0-25319.patch
 1431256-5-61a1.patch
 1431256-5-61a1.patch
 1449530-1-61a1.patch
 1449530-1-61a1.patch
 1449530-2-61a1.patch
 1449530-2-61a1.patch
+1737436-use-mozilla-compat-version-define-25320.patch
+1862395-incorrect-version-resistfingerprinting-v2-25320.patch