Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable the kNavigatorPluginsFixed feature to use Brave's farbling code
The CL below made a change to make fingerprinting more difficult in Chromium without breaking existing sites by returning a fixed list of PDF plugins, regardless of the actual ones available, which broke our farbling of the navigator.plugins array. Since farbling in Brave works in a different way (i.e. differently depending on the selected "farbling level"), we're just disabling this runtime feature to get back to the original code we had before, which would make sure the actual list of plugins is only returned if the used has explicitly disabled fingerprinting protections, otherwise a farbled, randomly generated and always different list of plugins will be returned (which is better than a fixed list anyway). Last, we add some new chromium_src overrides here to avoid the need of a C++ patch to disable this runtime feature via WebRuntimeFeatures. Chromium change: https://chromium.googlesource.com/chromium/src/+/fb96360c18b517bcc487c0de7235eec27e3adf5e commit fb96360c18b517bcc487c0de7235eec27e3adf5e Author: Mason Freed <masonf@chromium.org> Date: Fri Aug 6 20:20:17 2021 +0000 Hard-code the list of plugins and mimetypes in navigator See [1] for a previous attempt to completely empty the navigator.plugins and navigator.mimeTypes APIs. That caused site breakage due to sites scanning for a PDF reader. This new attempt is discussed in significant detail in [2], and involves the hard-coding of a list of PDF viewers and mime types. The plugins/mimetypes lists will be empty if the user setting to download PDFs instead of viewing them (chrome://settings/content/pdfDocuments) is enabled. This is to ensure compat with sites that scan the plugins list for specific PDF plugins to decide on behavior. Prior to this CL, when the PDF viewer is disabled, the PDF viewer plugins are unloaded. Tests were copied mostly verbatim from [3], thanks @domenic. I2S: https://groups.google.com/a/chromium.org/g/blink-dev/c/bbxAGu90LgM [1] https://chromium-review.googlesource.com/c/chromium/src/+/2783393 [2] whatwg/html#6738 [3] web-platform-tests/wpt#29559 Bug: 1164635
- Loading branch information