Skip to content

Commit

Permalink
UI formatURL: render null token correctly
Browse files Browse the repository at this point in the history
If the token argument to formatURL is null, it should be rendered as the
empty string and not the string 'null'.

Should fix hashicorp#1316 in which Safari gets a 403 error when visiting the
key/value page in the web UI.
  • Loading branch information
daveadams committed Oct 20, 2015
1 parent fc6a605 commit 75ded76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ui/javascripts/app/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ App.SettingsRoute = App.BaseRoute.extend({

// Adds any global parameters we need to set to a url/path
function formatUrl(url, dc, token) {
if (token == null) {
token = "";
}
if (url.indexOf("?") > 0) {
// If our url has existing params
url = url + "&dc=" + dc;
Expand Down

0 comments on commit 75ded76

Please sign in to comment.