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

browser.js: Avoid misdetecting Chrome OS as OS X #2470

Merged
merged 1 commit into from
Mar 6, 2021
Merged

browser.js: Avoid misdetecting Chrome OS as OS X #2470

merged 1 commit into from
Mar 6, 2021

Conversation

pgeorgi
Copy link

@pgeorgi pgeorgi commented Mar 1, 2021

Matching for lower-case "os x" not only finds "Mac OS X" but also
"CrOS x86_64". Mismatching Chrome OS as Apple device leads to
playback issues due to differences in supported client formats.

I checked User Agent lists on the Internet (e.g. https://developers.whatismybrowser.com/useragents/explore/) and all Apple browsers seem to report "Mac OS X $version" (mac OS) or something similar to "iPhone OS $version like Mac OS X" (iOS device family), so that extended regex should still work.

Fixes #2477

Matching for lower-case "os x" not only finds "Mac OS X" but also
"CrOS x86_64". Mismatching Chrome OS as Apple device leads to
playback issues due to differences in supported client formats.
@sonarcloud
Copy link

sonarcloud bot commented Mar 1, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@dkanada dkanada requested a review from thornbill March 4, 2021 08:07
Copy link
Member

@thornbill thornbill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I checked a couple open source user agent libraries and this seems to match how they check for macOS.

@dkanada dkanada merged commit 8d01ed5 into jellyfin:master Mar 6, 2021
@cvium cvium added the stable backport Backport into the next stable release label Mar 6, 2021
@cvium cvium added this to Active PRs in Release 10.7.0 via automation Mar 6, 2021
joshuaboniface pushed a commit that referenced this pull request Mar 6, 2021
browser.js: Avoid misdetecting Chrome OS as OS X

(cherry picked from commit 8d01ed5)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
@joshuaboniface joshuaboniface removed the stable backport Backport into the next stable release label Mar 6, 2021
@joshuaboniface joshuaboniface moved this from Active PRs to Completed PRs in Release 10.7.0 Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Release 10.7.0
  
Completed PRs
Development

Successfully merging this pull request may close these issues.

Chrome OS is mistaken for a "Chrome iPad", leading to video playback issues.
5 participants