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

Handle empty or unknown UA strings #1030

Closed
miketaylr opened this issue Apr 29, 2016 · 3 comments
Closed

Handle empty or unknown UA strings #1030

miketaylr opened this issue Apr 29, 2016 · 3 comments
Assignees

Comments

@miketaylr
Copy link
Member

To deal with part of #1009.

@miketaylr miketaylr self-assigned this Apr 29, 2016
@miketaylr
Copy link
Member Author

If you visit webcompat.com with an empty UA string:

@miketaylr
Copy link
Member Author

(wonder how many bots and scanners this prevented :p)

@miketaylr
Copy link
Member Author

Hm. Changed my mind on how I want to fix that part of the bug.

miketaylr pushed a commit that referenced this issue Apr 29, 2016
Give it a None default arg, in case it ever gets called without an arg.
Always return "unknown" by default.
If we get weird results back (i.e., "other"), normalize to "unknown".
miketaylr pushed a commit that referenced this issue Apr 29, 2016
Default None arg.
Return "Unknown" by default.
miketaylr pushed a commit that referenced this issue Apr 29, 2016
Default None arg.
Return "Unknown" by default.
Switch position of "(Tablet)" modifier to come before the version string.
Normalize "Other" result to "Unknown" for weird values.
miketaylr pushed a commit that referenced this issue Apr 29, 2016
Default None arg.
Return "Unknown" by default.
Normalize "Other" to "Unknown"
Add tests.
miketaylr pushed a commit that referenced this issue Apr 29, 2016
Default None arg.
Return "Unknown" by default.
Switch position of "(Tablet)" modifier to come before the version string.
Normalize "Other" result to "Unknown" for weird values.
miketaylr pushed a commit that referenced this issue Apr 29, 2016
miketaylr pushed a commit that referenced this issue May 2, 2016
@karlcow karlcow closed this as completed in c66c939 May 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants