Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web: Spoof prototypes to prevent false positive bot detections #18157

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

lihe07
Copy link

@lihe07 lihe07 commented Oct 3, 2024

Some bot detection libraries will detect the prototypes for navigator.plugins.

Current extension will cause false positives in such detections. (for example: by BotD)

This PR includes code that spoofs prototypes of related objects.

@danielhjacobs danielhjacobs added A-web Area: Web & Extensions T-fix Type: Bug fix (in something that's supposed to work already) labels Oct 3, 2024
@Dinnerbone
Copy link
Contributor

Thank you for this! Unfortunately it seems to break things, al of the tests are now failing with:

Uncaught TypeError: navigator.plugins.install is not a function

@lihe07
Copy link
Author

lihe07 commented Oct 4, 2024

Thank you for this! Unfortunately it seems to break things, al of the tests are now failing with:

Uncaught TypeError: navigator.plugins.install is not a function

Thank you!

Now things should work, and navigator.plugins instanceof PluginArray should be true.

@evilpie
Copy link
Collaborator

evilpie commented Oct 4, 2024

I want to look into this next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-web Area: Web & Extensions T-fix Type: Bug fix (in something that's supposed to work already)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants