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

Incorrect detection of user agent string #652

Open
etetlow opened this issue Apr 6, 2021 · 0 comments
Open

Incorrect detection of user agent string #652

etetlow opened this issue Apr 6, 2021 · 0 comments

Comments

@etetlow
Copy link

etetlow commented Apr 6, 2021

Hey,

I've caught quite an embarrassing mistake in the incorrect detection of a user agent string. The string in question is:
Mozilla/5.0 (Linux; Android 10; YAL-L21; HMSCore 5.2.0.318; GMSCore 21.09.15) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 HuaweiBrowser/11.0.6.305 Mobile Safari/537.36

On the website it's detected as:
manufacturer: Huawei
model: Browser
browser: Chrome
version: 83.0.4103.106
rendering engine: Blink
operating system: Android
version: 10

When in fact the model is an Honor 20 as the model number: YAL-L21 suggests in the user agent.
The browser is the in-built Huawei Browser, version: 11.06.305 as stated in the user agent.

I can see that it's gone through the detectGenericMobileModels function and found 'HUAWEI' but if 'Browser' is found right next to it, surely this is a big hint that it's not the model number. As it stands, any Huawei device using its own built-in browser is going to have the model detected as 'Browser'. Could someone please look into rectifying this.

Thanks.

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

No branches or pull requests

1 participant