diff --git a/patches/gecko-prevent-fingerprinting-via-eme.patch b/patches/gecko-prevent-fingerprinting-via-eme.patch new file mode 100644 index 00000000..ca671e6e --- /dev/null +++ b/patches/gecko-prevent-fingerprinting-via-eme.patch @@ -0,0 +1,24 @@ +diff --git a/dom/media/eme/MediaKeySystemAccessManager.cpp b/dom/media/eme/MediaKeySystemAccessManager.cpp +index acdc1030c06fa..c686a80691077 100644 +--- a/dom/media/eme/MediaKeySystemAccessManager.cpp ++++ b/dom/media/eme/MediaKeySystemAccessManager.cpp +@@ -421,8 +421,8 @@ void MediaKeySystemAccessManager::RequestMediaKeySystemAccess( + return; + } + +- if (!StaticPrefs::media_eme_enabled() && +- !IsClearkeyKeySystem(aRequest->mKeySystem)) { ++ if (!StaticPrefs::media_eme_enabled()) { ++// !IsClearkeyKeySystem(aRequest->mKeySystem)) { + // EME disabled by user, send notification to chrome so UI can inform user. + // Clearkey is allowed even when EME is disabled because we want the pref + // "media.eme.enabled" only taking effect on proprietary DRMs. +@@ -431,7 +431,7 @@ void MediaKeySystemAccessManager::RequestMediaKeySystemAccess( + MediaKeySystemAccess::NotifyObservers(mWindow, aRequest->mKeySystem, + MediaKeySystemStatus::Api_disabled); + } +- aRequest->RejectPromiseWithNotSupportedError("EME has been preffed off"_ns); ++ aRequest->RejectPromiseWithNotSupportedError("The application embedding this user agent has blocked MediaKeySystemAccess"_ns); + aRequest->mDiagnostics.StoreMediaKeySystemAccess( + mWindow->GetExtantDoc(), aRequest->mKeySystem, false, __func__); + return; diff --git a/scripts/patches.yaml b/scripts/patches.yaml index 3f4cf072..6a0d9728 100644 --- a/scripts/patches.yaml +++ b/scripts/patches.yaml @@ -554,6 +554,21 @@ patches: effect: "Users are protected against additional fingerprinting vectors, and websites work as expected." category: "Privacy" + - file: "gecko-prevent-fingerprinting-via-eme.patch" + name: "Prevent fingerprinting via EME" + description: "Prevents fingerprinting via the status of EME." + reason: | + Fenix typically doesn't provide a way to configure `media.eme.enabled`. Due to a different + message being reported to websites when EME is disabled (than when its blocked via the permission), + this means that us disabling EME adds an additional fingerprinting vector and causes us to + stick out from standard Firefox users. + To prevent this, this patch makes it so that when EME is disabled, Firefox acts the same as if the + EME permission was blocked or ignored by the user. + This also helps ensure that users who enable EME and block a website from accessing it (on devices + that support Widevine) appear the same as those who leave EME disabled. + effect: "Users are protected against additional fingerprinting vectors." + category: "Privacy" + - file: "gecko-prevent-exposing-name-and-vendor-to-extensions.patch" name: "Prevent exposing the browser name and vendor to extensions" description: |