Verified Commit f73de56a authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃
Browse files

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
parent 90279c70
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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;

+4 −4
Original line number Diff line number Diff line
@@ -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;

+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,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;