Modify the fingerprint weights (#1367)

* Modify the fingerprint weights

* Update cspell.json
This commit is contained in:
Belle Aerni authored and GitHub committed 2023-06-25 23:38:59 +03:00
1 parent 4742615870
commit 776ddcb7e9
2 files changed
+17 -4

No files matched your search

+2 -1
View File
@@ -339,7 +339,8 @@
"QWERTYUIOPASDFGHJKLZXCVBNM",
"subkeys",
"httponly",
"samesite"
"samesite",
"IPCOUNTRY"
],
"ignorePaths": [
"tests/**",
+15 -3
View File
@@ -45,7 +45,7 @@ class Fingerprint
],
'ip' => [
'source' => $_SERVER['REMOTE_ADDR'] ?? '',
'weight' => 3,
'weight' => 2,
],
'referrer' => [
'source' => $_SERVER['HTTP_REFERER'] ?? '',
@@ -53,11 +53,11 @@ class Fingerprint
],
'forwardedFor' => [
'source' => $_SERVER['HTTP_X_FORWARDED_FOR'] ?? '',
'weight' => 3,
'weight' => 1,
],
'language' => [
'source' => $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? '',
'weight' => 2,
'weight' => 3,
],
'encoding' => [
'source' => $_SERVER['HTTP_ACCEPT_ENCODING'] ?? '',
@@ -67,6 +67,18 @@ class Fingerprint
'source' => $_SERVER['HTTP_UPGRADE_INSECURE_REQUESTS'] ?? '',
'weight' => 1,
],
'platform' => [
'source' => $_SERVER['HTTP_SEC_CH_UA_PLATFORM'] ?? '',
'weight' => 100, // Should more-or-less match the 'OS'. This also should never randomly change
],
'mobile' => [
'source' => $_SERVER['HTTP_SEC_CH_UA_MOBILE'] ?? '',
'weight' => 3,
],
'cloudFlareCountry' => [
'source' => $_SERVER['HTTP_CF_IPCOUNTRY'] ?? '', // "IP Geolocation" must be enabled under Cloudflare's "network" settings
'weight' => 4,
],
];
}