[tor-commits] [Git][tpo/applications/mullvad-browser][mullvad-browser-128.3.0esr-14.0-1] Bug 1918009 - Fix the RFP-spoofed User-Agent header. r=tjr

morgan (@morgan) git at gitlab.torproject.org
Wed Oct 2 18:51:06 UTC 2024



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


Commits:
92d9fad9 by Pier Angelo Vendrame at 2024-10-02T18:50:03+00:00
Bug 1918009 - Fix the RFP-spoofed User-Agent header. r=tjr

The spoofed value of the HTTP user-agent header is not consistent with
the value of navigator.userAgent on Windows, and this can lead to
compatibility issues.

Differential Revision: https://phabricator.services.mozilla.com/D223745
- - - - -


3 changed files:

- browser/components/resistfingerprinting/test/browser/browser_navigator.js
- browser/components/resistfingerprinting/test/browser/browser_navigator_iframes.js
- toolkit/components/resistfingerprinting/nsRFPService.h


Changes:

=====================================
browser/components/resistfingerprinting/test/browser/browser_navigator.js
=====================================
@@ -115,11 +115,11 @@ const SPOOFED_UA_NAVIGATOR_OS = {
   other: "X11; Linux x86_64",
 };
 const SPOOFED_UA_HTTPHEADER_OS = {
-  linux: "Windows NT 10.0",
-  win: "Windows NT 10.0",
-  macosx: "Windows NT 10.0",
+  linux: "Windows NT 10.0; Win64; x64",
+  win: "Windows NT 10.0; Win64; x64",
+  macosx: "Windows NT 10.0; Win64; x64",
   android: "Android 10; Mobile",
-  other: "Windows NT 10.0",
+  other: "Windows NT 10.0; Win64; x64",
 };
 const SPOOFED_HW_CONCURRENCY = 2;
 


=====================================
browser/components/resistfingerprinting/test/browser/browser_navigator_iframes.js
=====================================
@@ -130,11 +130,11 @@ const SPOOFED_UA_NAVIGATOR_OS = {
   other: "X11; Linux x86_64",
 };
 const SPOOFED_UA_HTTPHEADER_OS = {
-  linux: "Windows NT 10.0",
-  win: "Windows NT 10.0",
-  macosx: "Windows NT 10.0",
+  linux: "Windows NT 10.0; Win64; x64",
+  win: "Windows NT 10.0; Win64; x64",
+  macosx: "Windows NT 10.0; Win64; x64",
   android: "Android 10; Mobile",
-  other: "Windows NT 10.0",
+  other: "Windows NT 10.0; Win64; x64",
 };
 const SPOOFED_HW_CONCURRENCY = 2;
 


=====================================
toolkit/components/resistfingerprinting/nsRFPService.h
=====================================
@@ -63,7 +63,7 @@
 #if defined(MOZ_WIDGET_ANDROID)
 #  define SPOOFED_HTTP_UA_OS "Android 10; Mobile"
 #else
-#  define SPOOFED_HTTP_UA_OS "Windows NT 10.0"
+#  define SPOOFED_HTTP_UA_OS "Windows NT 10.0; Win64; x64"
 #endif
 
 struct JSContext;



View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/92d9fad94182e24523e903a1e783e5e02f6c5021

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/92d9fad94182e24523e903a1e783e5e02f6c5021
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/20241002/17dfe028/attachment-0001.htm>


More information about the tor-commits mailing list