[Bug] Several `navigator.plugins` inconsistencies
See original GitHub issueDescribe the bug
This is an aggregated bug report for a few inconsistencies that I found in navigator.plugins
evasion.
Reference mismatch
Chromium implementation of navigator.plugins
array references single PluginData
instance (DOMPluginArray::refresh
from L103) at both enabledPlugin
field, integer and string key of navigator.plugins[]
and nested enabledPlugin
-s etc.
Code Snippet
// `refMatch` - Headless reports `false` while regular Chrome `true`
const nameMatch = navigator.plugins[0].name === navigator.plugins[0][0].enabledPlugin.name;
const refMatch = navigator.plugins[0][0].enabledPlugin === navigator.plugins[0];
navigator.plugins.refresh
is not writable
Code Snippet
// `overrideTest` - Headless reports `false` while regular Chrome `true`
navigator.plugins.refresh = 'test';
const overrideTest = navigator.plugins.refresh === 'test';
item(unsigned long index)
overflow
This is related to how V8 handles numerical overflows. This may theoretically have a wider impact than only navigator.plugins
but need to be researched.
Code Snippet
// `overflowTest` - Headless reports `false` while regular Chrome `true`
const overflowTest = navigator.plugins.item(4294967296) === navigator.plugins[0];
// this can go on with navigator.plugins.item(4294967297) === navigator.plugins[1]; etc.
<object />
onerror (PDF Viewer)
This is related to how events are fired from the <object />
. To demonstrate this one I used a sample PDF file from here: http://www.africau.edu/images/default/sample.pdf
Code Snippet
// ...
await page.goto('http://www.africau.edu/');
const testResult = await page.evaluate(async () => {
await new Promise(resolve => {
const obj = document.createElement("object");
obj.data = "http://www.africau.edu/images/default/sample.pdf"; // A URL with ".pdf" extension. It doesnt have to be a valid PDF document. Anything that's over 0B in size will work.
obj.onload = function() { resolve(true) }
obj.onerror = function() { resolve(false) }
document.body.appendChild(obj);
})
});
// `testResult` - Headless reports `false` while a regular Chrome `true`
Versions
Most recent.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
navigator.plugins - How To Create
It is a complete mess. All caused by not just a missing object, but by a completely incorrect implementation of an otherwise very...
Read more >Critical Error - WordPress.org
Hi,. When Regenerate images is done, between 20% and 30% I get the error message at the bottom of the page: <p>There is...
Read more >1164635 - Consider hard-coding navigator.plugins ... - Monorail
On Friday, I'll land a CL to return [] for both navigator.plugins and navigator.mimeTypes. 3. We'll see what happens in Canary M90 in...
Read more >15229 – View errors when launching with out the plugins needed to ...
So this bug is to track that issue with Views and Perspectives which I assume are the province of the UI. These were...
Read more >The ICMAdminClientPlugin plug-in contains errors messages ...
If Content Navigator is clustered, make sure the JAR file path is identical on all the nodes.) Test with different browser versions and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
these bugs are actively used by cloudflare for bot detection
levi, happy new year, this plugin is obsolete how i subscribed here