-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fix invalid browser name, version and plugins messages (#3051) #3149
Fix invalid browser name, version and plugins messages (#3051) #3149
Conversation
Although the current implementation is insane (it was developed when there was usually years between major releases), we should not throw it out in favor of weak detection (ie, untrusted user agent string). The entire browser fingerprinting system needs to be reworked. If your goal is to make the "invalid browser" error message go away, please extend the existing functionality. |
If you would prefer to rework the browser fingerprinting, please see: |
Thanks, @bcoles, for your feedback, I have extended the existing functionality. In scope of #3051, I would like to address the invalid name / version and plugins issues. I've noticed that the browser fingerprinting functionality could benefit from significant refactoring. I'd be happy to take on this task once I complete the current fix, given its priority and my availability. |
Hey @bcoles , @stephenakq , I believe I've resolved the issue. Can we merge this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user agent cannot be trusted. Please extend the existing approach to support new browser versions.
Hi @bcoles , am I still missing anything or this can finally be merged? Thanks |
The user agent cannot be trusted to identify the browser. The entire browser detection needs to be reworked (#1392). In lieu of resolving the underlying issue, the browser detection should continue to use the existing approach. |
@bcoles , I have reverted the UA check to find browser name. Any issues with the fixes for version and plugin checks? |
Hey @stephenakq , as requested I have added https://github.com/bowser-js/bowser into the code and extended the browser name recognition functionality for Chrome, Firefox and Opera. This PR now has everything that's needed to address #3051 Could you please merge this PR now? Thanks |
Pull Request
Thanks for submitting a PR! Please fill in this template where appropriate:
Category
Bug
Feature/Issue Description
Q: Please give a brief summary of your feature/fix
A: Fix invalid browser version and plugins messages (#3051)
Q: Give a technical rundown of what you have changed (if applicable)
A: Updated conditions checking for valid browser version. Also added message for situation when plugins are not detected (e. g. for mobile browsers). Added https://github.com/bowser-js/bowser and extended Chrome, Firefox and Opera browser name recognition.
Test Cases
Q: Describe your test cases, what you have covered and if there are any use cases that still need addressing.
A: Successfully ran bundle exec rake, had print_info in the browser.rb file to confirm the values when hooking Firefox, Chrome, Opera and Android Chrome. Also, executed all the debug modules with these 3 browser types without any errors on beef side.
Wiki Page
If you are adding a new feature that is not easily understood without context, please draft a section to be added to the Wiki below.