]> source.dussan.org Git - sonarqube.git/commit
do not send an overriden language if none is set
authorThomas Weißschuh <thomas.weissschuh@de.amadeus.com>
Wed, 17 Aug 2016 15:46:29 +0000 (15:46 +0000)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 15 Sep 2016 08:37:18 +0000 (10:37 +0200)
commit53620de6df74d058e73a512da0f2c4143340670d
tree3b02982820144af3517526e475cc4d356a3e49a6
parentbfcbb7e32fde1569d2d3225a5217eb36fb65812e
do not send an overriden language if none is set

If the browser does not have any language configured
`window.navigator.languages == []` and
`window.navigator.language == ""`.
(at least on FF)
In this case an empty GET parameter is submitted to `/api/l10n/index?locale=`.
This leads to a 400 Bad Request response and no language data.
Therefore the navbar has no UI elements and is unusable, make login impossible.
server/sonar-web/src/main/js/helpers/l10n.js