From 344c7f08e789ed7f77dd3480dbf0959f4de1c97b Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Sun, 25 Oct 2020 11:25:31 -0700 Subject: [PATCH] Add missing return in lock handler request decoding * If a request message can't be decoded, a Reply indicating and error should be returned without continuing --- internal/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/server.go b/internal/server.go index 7e3ca4e..9595139 100644 --- a/internal/server.go +++ b/internal/server.go @@ -105,6 +105,7 @@ func (s *Server) lock(w http.ResponseWriter, req *http.Request) { if err != nil { s.log.Errorf("fleetlock: error decoding message: %v", err) encodeReply(w, NewReply(KindDecodeError, "error decoding message")) + return } id := msg.ClientParmas.ID group := msg.ClientParmas.Group