зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1383495 - Spoof Navigator API platform as win64 when resisting fingerprinting is enabled. r=ehsan
This commit is contained in:
Родитель
94e1614eb3
Коммит
dd89a080a0
|
@ -12,7 +12,7 @@ var spoofedUserAgent;
|
||||||
|
|
||||||
const SPOOFED_APPNAME = "Netscape";
|
const SPOOFED_APPNAME = "Netscape";
|
||||||
const SPOOFED_APPVERSION = "5.0 (Windows)";
|
const SPOOFED_APPVERSION = "5.0 (Windows)";
|
||||||
const SPOOFED_PLATFORM = "Win32";
|
const SPOOFED_PLATFORM = "Win64";
|
||||||
const SPOOFED_OSCPU = "Windows NT 6.1";
|
const SPOOFED_OSCPU = "Windows NT 6.1";
|
||||||
const SPOOFED_BUILDID = "20100101";
|
const SPOOFED_BUILDID = "20100101";
|
||||||
const SPOOFED_HW_CONCURRENCY = 2;
|
const SPOOFED_HW_CONCURRENCY = 2;
|
||||||
|
|
|
@ -455,9 +455,10 @@ nsHttpHandler::Init()
|
||||||
mAppVersion.AssignLiteral(MOZ_APP_UA_VERSION);
|
mAppVersion.AssignLiteral(MOZ_APP_UA_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generating the spoofed userAgent for fingerprinting resistance. We will
|
// Generating the spoofed userAgent for fingerprinting resistance.
|
||||||
// round the version to the nearest 10. By doing so, the anonymity group will
|
// The browser version will be rounded down to a multiple of 10.
|
||||||
// cover more versions instead of one version.
|
// By doing so, the anonymity group will cover more versions instead of one
|
||||||
|
// version.
|
||||||
uint32_t spoofedVersion = mAppVersion.ToInteger(&rv);
|
uint32_t spoofedVersion = mAppVersion.ToInteger(&rv);
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
spoofedVersion = spoofedVersion - (spoofedVersion % 10);
|
spoofedVersion = spoofedVersion - (spoofedVersion % 10);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#define SPOOFED_APPNAME "Netscape"
|
#define SPOOFED_APPNAME "Netscape"
|
||||||
#define SPOOFED_APPVERSION "5.0 (Windows)"
|
#define SPOOFED_APPVERSION "5.0 (Windows)"
|
||||||
#define SPOOFED_OSCPU "Windows NT 6.1"
|
#define SPOOFED_OSCPU "Windows NT 6.1"
|
||||||
#define SPOOFED_PLATFORM "Win32"
|
#define SPOOFED_PLATFORM "Win64"
|
||||||
|
|
||||||
#define LEGACY_BUILD_ID "20100101"
|
#define LEGACY_BUILD_ID "20100101"
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче