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

Add coarse UA detection to stub attribution (Fixes #8405) #8483

Merged
merged 1 commit into from Feb 5, 2020

Conversation

@alexgibson
Copy link
Member

@alexgibson alexgibson commented Feb 4, 2020

Description

  • Adds a new ua parameter to stub attribution.

Issue / Bugzilla link

#8405

Testing

Demo: https://www-demo5.allizom.org/en-US/

@mozmeao-heroku-bot mozmeao-heroku-bot temporarily deployed to www-demo5 Feb 4, 2020 Inactive
@alexgibson alexgibson force-pushed the alexgibson:stub-attribution-ua branch from e20dbfd to ba2777d Feb 5, 2020
@mozmeao-heroku-bot mozmeao-heroku-bot temporarily deployed to www-demo5 Feb 5, 2020 Inactive
@alexgibson alexgibson marked this pull request as ready for review Feb 5, 2020
@alexgibson alexgibson requested a review from pmac Feb 5, 2020
@pmac
pmac approved these changes Feb 5, 2020
Copy link
Member

@pmac pmac left a comment

Nice work! 💯

@alexgibson alexgibson merged commit 53212f1 into mozilla:master Feb 5, 2020
2 checks passed
2 checks passed
ci/circleci: test_js Your tests passed on CircleCI!
Details
ci/circleci: test_py Your tests passed on CircleCI!
Details
@alexgibson alexgibson deleted the alexgibson:stub-attribution-ua branch Feb 5, 2020
if (/Opera/.test(ua)) {
return 'opera';
Comment on lines +179 to +180

This comment has been minimized.

@Mardak

Mardak Feb 6, 2020
Member

No need to fix this, as we didn't list Opera in the bug and this is acceptable as a false positive. FYI, here's the user agent from Opera on mac:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36 OPR/66.0.3515.72

and windows:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36 OPR/66.0.3515.44

This comment has been minimized.

@alexgibson

alexgibson Feb 6, 2020
Author Member

If Opera isn't a concern I'll go ahead and remove this altogether 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants