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

x/website: download.js incorrectly defines browser OS #41537

Closed
ipriver opened this issue Sep 21, 2020 · 1 comment
Closed

x/website: download.js incorrectly defines browser OS #41537

ipriver opened this issue Sep 21, 2020 · 1 comment
Labels
Milestone

Comments

@ipriver
Copy link
Contributor

@ipriver ipriver commented Sep 21, 2020

What did you do?

Opened golang.org/doc/install in different browsers using Linux OS.

What did you expect to see?

Expected to see that "Download" button has a filename for Linux.

What did you see instead?

JS incorrectly defines OS as a "Unix" system and because of that user sees an empty button (there's no filename for unix golang binary to download) that redirects him to https://golang.org/dl/ if user clicks it.

How it happens:

navigator.appVersion = 5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36 Chrome 85.0.4183.102
JS correctly defines OS as a Linux, but because there is no return it continues executing and gets overwritten when next if statement indexes "X11".

navigator.appVersion = "5.0 (X11)" Firefox 80.0.1
Doesn't have a word "Linux" in it and defines system as "Unix" as it includes "X11".

@gopherbot
Copy link

@gopherbot gopherbot commented Sep 21, 2020

Change https://golang.org/cl/256318 mentions this issue: doc/install: fixed how JS defines browser OS

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

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.