From fa5c0b073214191e6996ba0b5bc8e61560ff822c Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Wed, 27 Sep 2023 00:53:30 -0400 Subject: Update the JShelter extension to 0.15.2. --- .../jsr@javascriptrestrictor/wrappingS-NP.js | 79 +++++++++++++++------- 1 file changed, 55 insertions(+), 24 deletions(-) (limited to 'data/extensions/jsr@javascriptrestrictor/wrappingS-NP.js') diff --git a/data/extensions/jsr@javascriptrestrictor/wrappingS-NP.js b/data/extensions/jsr@javascriptrestrictor/wrappingS-NP.js index 018eaee..4bcd333 100644 --- a/data/extensions/jsr@javascriptrestrictor/wrappingS-NP.js +++ b/data/extensions/jsr@javascriptrestrictor/wrappingS-NP.js @@ -47,6 +47,19 @@ * These approaches are inspired by the algorithms created by [Brave Software](https://brave.com) * available [here](https://github.com/brave/brave-core/blob/master/chromium_src/third_party/blink/renderer/modules/plugins/dom_plugin_array.cc). * + * The purpose of the wrappers is solely to prevent fingerprinting. However, + * browsers modyfing the array stand out of the crowd, which makes them more + * fingerprintable. Consequently, JShelter does not modify an empty list. So + * no matter the configuration, an empty list is not populated by the wrappers. + * + * If PDF inline viewing is supported, Firefox returns 5 plugins: + * * "PDF Viewer" + * * "Chrome PDF Viewer" + * * "Chromium PDF Viewer" + * * "Microsoft Edge PDF Viewer" + * * "WebKit built-in PDF" + * + * A list containing exactly these plugins is treated as the empty list and it is not modified. */ /* @@ -269,36 +282,54 @@ { parent_object: "Navigator.prototype", parent_object_property: "plugins", - apply_if: "navigator.plugins.length > 0", + apply_if: "applyWrapper", wrapped_objects: [], helping_code: methods + farbles + fakes +` - var fp_prng = alea(domainHash, "S-NP"); - var plugins = navigator.plugins; - var buffer = []; - if(args[0]==0){ - for(var i = 0;i