Skip to content

Commit

Permalink
proxy: Resolves potential panic in request handler
Browse files Browse the repository at this point in the history
  • Loading branch information
arekkas committed Jun 11, 2018
1 parent 546828d commit a2f90ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion proxy/proxy_test.go
Expand Up @@ -161,7 +161,7 @@ func TestProxy(t *testing.T) {
transform: func(r *http.Request) {
r.Header.Add("Authorization", "bearer token")
},
code: http.StatusInternalServerError,
code: http.StatusUnauthorized,
},
{
d: "should fail because no credentials issuer was configured",
Expand Down
8 changes: 4 additions & 4 deletions proxy/request_handler.go
Expand Up @@ -115,11 +115,11 @@ func (d *RequestHandler) HandleRequest(r *http.Request, rl *rule.Rule) error {
Warn("The authentication handler encountered an error")
return err
}
} else {
// The first authenticator that matches must return the session
found = true
break
}

// The first authenticator that matches must return the session
found = true
break
}

if !found {
Expand Down

0 comments on commit a2f90ce

Please sign in to comment.