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".
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.36Chrome 85.0.4183.102JS correctly defines OS as a Linux, but because there is no
returnit continues executing and gets overwritten when nextifstatement indexes "X11".navigator.appVersion = "5.0 (X11)"Firefox 80.0.1Doesn't have a word "Linux" in it and defines system as "Unix" as it includes "X11".