From d263e69f478a5491a589bae94fcf6b48c42e2573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C4=8Ctvrtka?= Date: Wed, 29 Nov 2023 10:59:27 +0100 Subject: [PATCH] PMM-12251 URL query escape. --- managed/services/grafana/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/managed/services/grafana/client.go b/managed/services/grafana/client.go index f08ff075f3..749527188e 100644 --- a/managed/services/grafana/client.go +++ b/managed/services/grafana/client.go @@ -345,7 +345,7 @@ type serviceAccountSearch struct { func (c *Client) getServiceAccountIDFromName(ctx context.Context, nodeName string, authHeaders http.Header) (int, error) { var res serviceAccountSearch - if err := c.do(ctx, http.MethodGet, "/api/serviceaccounts/search", fmt.Sprintf("query=%s", nodeName), authHeaders, nil, &res); err != nil { + if err := c.do(ctx, http.MethodGet, "/api/serviceaccounts/search", fmt.Sprintf("query=%s", url.QueryEscape(nodeName)), authHeaders, nil, &res); err != nil { return 0, err }