Ticket #26146: ua.patch

File ua.patch, 1.9 KB (added by mcs, 11 months ago)

patch which was used for testing

  • toolkit/components/resistfingerprinting/nsRFPService.h

    diff --git a/toolkit/components/resistfingerprinting/nsRFPService.h b/toolkit/components/resistfingerprinting/nsRFPService.h
    index 9708d362496f..627f727fde08 100644
    a b  
    1616#include "nsString.h"
    1717
    1818// Defines regarding spoofed values of Navigator object. These spoofed values
    1919// are returned when 'privacy.resistFingerprinting' is true.
    2020// We decided to give different spoofed values according to the platform. The
    2121// reason is that it is easy to detect the real platform. So there is no benefit
    2222// for hiding the platform: it only brings breakages, like keyboard shortcuts won't
    2323// work in MAC OS if we spoof it as a window platform.
     24
     25#if defined(MOZ_WIDGET_ANDROID)
     26#define SPOOFED_UA_OS      "Android 6.0; Mobile"
     27#else
     28#define SPOOFED_UA_OS      "Windows NT 6.1"
     29#endif
     30
    2431#ifdef XP_WIN
    25 #define SPOOFED_UA_OS      "Windows NT 6.1; Win64; x64"
    2632#define SPOOFED_APPVERSION "5.0 (Windows)"
    2733#define SPOOFED_OSCPU      "Windows NT 6.1; Win64; x64"
    2834#define SPOOFED_PLATFORM   "Win64"
    2935#elif defined(XP_MACOSX)
    30 #define SPOOFED_UA_OS      "Macintosh; Intel Mac OS X 10.13"
    3136#define SPOOFED_APPVERSION "5.0 (Macintosh)"
    3237#define SPOOFED_OSCPU      "Intel Mac OS X 10.13"
    3338#define SPOOFED_PLATFORM   "MacIntel"
    3439#elif defined(MOZ_WIDGET_ANDROID)
    35 #define SPOOFED_UA_OS      "Android 6.0; Mobile"
    3640#define SPOOFED_APPVERSION "5.0 (Android 6.0)"
    3741#define SPOOFED_OSCPU      "Linux armv7l"
    3842#define SPOOFED_PLATFORM   "Linux armv7l"
    3943#else
    4044// For Linux and other platforms, like BSDs, SunOS and etc, we will use Linux
    4145// platform.
    42 #define SPOOFED_UA_OS      "X11; Linux x86_64"
    4346#define SPOOFED_APPVERSION "5.0 (X11)"
    4447#define SPOOFED_OSCPU      "Linux x86_64"
    4548#define SPOOFED_PLATFORM   "Linux x86_64"
    4649#endif
    4750
    4851#define SPOOFED_APPNAME    "Netscape"
    4952#define LEGACY_BUILD_ID    "20100101"
    5053