Skip to content

Commit

Permalink
Fixes Breaking Change
Browse files Browse the repository at this point in the history
#565 introduced a looping Auth, because the path used to auth against was updated, but the path used to verify that the _current_ request isn't an Auth request was still using the outdated version. So `odin.doRequest()` never realized the request being made was an Auth request, which caused it to initiate a new Auth request of its own to get the creds with which to make the _actual_ request. Which it didn't realize already was an Auth request. And so on.

This commit updates the check to use the correct path.
  • Loading branch information
danhunsaker committed Sep 6, 2017
1 parent 0deeeb2 commit d9469af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/odin/odin.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ func doRequest(method, path string, params url.Values, requestBody, responseBody
if auth.Key == "" &&
os.Getenv("NANOBOX_PASSWORD") != "" &&
os.Getenv("NANOBOX_USERNAME") != "" &&
path != fmt.Sprintf("users/%s/auth_token", os.Getenv("NANOBOX_USERNAME")) {
path != "user_auth_token" {

auth.Key, _ = Auth(os.Getenv("NANOBOX_USERNAME"), os.Getenv("NANOBOX_PASSWORD"))
}
Expand Down

0 comments on commit d9469af

Please sign in to comment.