From d03a43335e78852af68d4b73b182109e83477525 Mon Sep 17 00:00:00 2001 From: Mike O Date: Fri, 19 Jul 2019 18:54:22 -0700 Subject: [PATCH] Return HTTP 400 for invalid state parameter --- server/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/handlers.go b/server/handlers.go index 39b98423..5f46dcc3 100644 --- a/server/handlers.go +++ b/server/handlers.go @@ -417,7 +417,7 @@ func (s *Server) handleConnectorCallback(w http.ResponseWriter, r *http.Request) if err != nil { if err == storage.ErrNotFound { s.logger.Errorf("Invalid 'state' parameter provided: %v", err) - s.renderError(w, http.StatusInternalServerError, "Requested resource does not exist.") + s.renderError(w, http.StatusBadRequest, "Requested resource does not exist.") return } s.logger.Errorf("Failed to get auth request: %v", err)