Skip to content

Commit

Permalink
Merge pull request #14692 from liggitt/log-state-error
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot committed Jun 18, 2017
2 parents a2d9765 + d2782fa commit 2d90d52
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/auth/oauth/external/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, req *http.Request) {

// Validate state before making any server-to-server calls
ok, err := h.state.Check(authData.State, req)
if !ok {
glog.V(4).Infof("State is invalid")
err := errors.New("State is invalid")
if err != nil {
glog.V(4).Infof("Error verifying state: %v", err)
h.handleError(err, w, req)
return
}
if err != nil {
glog.V(4).Infof("Error verifying state: %v", err)
if !ok {
glog.V(4).Infof("State is invalid")
err := errors.New("State is invalid")
h.handleError(err, w, req)
return
}
Expand Down

0 comments on commit 2d90d52

Please sign in to comment.