From 0b463beb2c87f1f22afd3a89a27ac53f2478f8cf Mon Sep 17 00:00:00 2001 From: Bolek <1416262+bolekk@users.noreply.github.com> Date: Tue, 26 Sep 2023 09:53:18 -0700 Subject: [PATCH] [Gateway] Don't save node responses with incorrect method name (#10796) --- core/services/gateway/handlers/functions/handler.functions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/services/gateway/handlers/functions/handler.functions.go b/core/services/gateway/handlers/functions/handler.functions.go index 82d4976db2b..7eb15ef6ffd 100644 --- a/core/services/gateway/handlers/functions/handler.functions.go +++ b/core/services/gateway/handlers/functions/handler.functions.go @@ -230,10 +230,10 @@ func (h *functionsHandler) processSecretsResponse(response *api.Message, respons if _, exists := responseData.responses[response.Body.Sender]; exists { return nil, nil, errors.New("duplicate response") } - responseData.responses[response.Body.Sender] = response if response.Body.Method != responseData.request.Body.Method { return nil, responseData, errors.New("invalid method") } + responseData.responses[response.Body.Sender] = response var responsePayload SecretsResponseBase err := json.Unmarshal(response.Body.Payload, &responsePayload) if err != nil {