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

[bug] Incorrect version for Mobile Safari #429

Closed
EECOLOR opened this issue Sep 12, 2019 · 2 comments · Fixed by #458
Closed

[bug] Incorrect version for Mobile Safari #429

EECOLOR opened this issue Sep 12, 2019 · 2 comments · Fixed by #458

Comments

@EECOLOR
Copy link
Contributor

EECOLOR commented Sep 12, 2019

The test cases contain a few incorrect entries:

  - user_agent_string: 'Mozilla/5.0 (iPod touch; CPU iPhone OS 9_3_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13F69'
    family: 'Mobile Safari UI/WKWebView'
    major: '9'
    minor: '3'
    patch: '2'
  - user_agent_string: 'Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Mobile/11D257'
    family: 'Mobile Safari UI/WKWebView'
    major: '7'
    minor: '1'
    patch: '2'
  - user_agent_string: 'Mozilla/5.0 (iPad; U; CPU OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile'
    family: 'Mobile Safari UI/WKWebView'
    major: '4'
    minor: '3'
    patch: '2'
- user_agent_string: 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) AppleNews/608.0.1 Version/2.0.1'
    family: 'Mobile Safari UI/WKWebView'
    major: '10'
    minor: '0'
    patch: '2'

As you can see the OS version is used as the Safari version, which is incorrect. This causes problems with more modern ua strings.

Mozilla/5.0 (iPhone; CPU iPhone OS 12_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 ManagedBrowser/20181024.1

Will be detected as Mobile Safari 12.4 which should have the IntersectionObserver. In reality however, this browser does not seem to have an IntersectionObserver, but it does not receive a polyfill (polyfill.io).

It would be best that ua version would be set to empty (unknown) in these cases. If you agree, I can attempt to create a pull request with these changes.

@commenthol
Copy link
Contributor

@EECOLOR Could you please provide us with a PR?

EECOLOR added a commit to EECOLOR/uap-core that referenced this issue Jan 31, 2020
The OS version should not be used as browser version.

fixes ua-parser#429
@EECOLOR
Copy link
Contributor Author

EECOLOR commented Jan 31, 2020

@commenthol #458

Closing this issue in favor of the created pull request.

@EECOLOR EECOLOR closed this as completed Jan 31, 2020
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

Successfully merging a pull request may close this issue.

2 participants