Resolves: RHEL-44887

This commit is contained in:
Sam Feifer 2024-07-16 14:32:04 -04:00
parent 11e29db346
commit 720ae7511b
2 changed files with 57 additions and 1 deletions

View File

@ -0,0 +1,51 @@
diff --git a/vendor/github.com/hashicorp/go-retryablehttp/client.go b/vendor/github.com/hashicorp/go-retryablehttp/client.go
index f40d241..765a828 100644
--- a/vendor/github.com/hashicorp/go-retryablehttp/client.go
+++ b/vendor/github.com/hashicorp/go-retryablehttp/client.go
@@ -584,9 +584,9 @@ func (c *Client) Do(req *Request) (*http.Response, error) {
if logger != nil {
switch v := logger.(type) {
case LeveledLogger:
- v.Debug("performing request", "method", req.Method, "url", req.URL)
+ v.Debug("performing request", "method", req.Method, "url", req.URL.Redacted())
case Logger:
- v.Printf("[DEBUG] %s %s", req.Method, req.URL)
+ v.Printf("[DEBUG] %s %s", req.Method, req.URL.Redacted())
}
}
@@ -641,9 +641,9 @@ func (c *Client) Do(req *Request) (*http.Response, error) {
if err != nil {
switch v := logger.(type) {
case LeveledLogger:
- v.Error("request failed", "error", err, "method", req.Method, "url", req.URL)
+ v.Error("request failed", "error", err, "method", req.Method, "url", req.URL.Redacted())
case Logger:
- v.Printf("[ERR] %s %s request failed: %v", req.Method, req.URL, err)
+ v.Printf("[ERR] %s %s request failed: %v", req.Method, req.URL.Redacted(), err)
}
} else {
// Call this here to maintain the behavior of logging all requests,
@@ -679,7 +679,7 @@ func (c *Client) Do(req *Request) (*http.Response, error) {
wait := c.Backoff(c.RetryWaitMin, c.RetryWaitMax, i, resp)
if logger != nil {
- desc := fmt.Sprintf("%s %s", req.Method, req.URL)
+ desc := fmt.Sprintf("%s %s", req.Method, req.URL.Redacted())
if resp != nil {
desc = fmt.Sprintf("%s (status: %d)", desc, resp.StatusCode)
}
@@ -735,11 +735,11 @@ func (c *Client) Do(req *Request) (*http.Response, error) {
// communicate why
if err == nil {
return nil, fmt.Errorf("%s %s giving up after %d attempt(s)",
- req.Method, req.URL, attempt)
+ req.Method, req.URL.Redacted(), attempt)
}
return nil, fmt.Errorf("%s %s giving up after %d attempt(s): %w",
- req.Method, req.URL, attempt, err)
+ req.Method, req.URL.Redacted(), attempt, err)
}
// Try to read the response body so we can reuse this connection.

View File

@ -25,7 +25,7 @@ end}
Name: grafana
Version: 10.2.6
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Metrics dashboard and graph editor
License: AGPL-3.0-only
URL: https://grafana.org
@ -81,6 +81,7 @@ Patch10: 0010-remove-bcrypt-references.patch
Patch1001: 1001-vendor-patch-removed-backend-crypto.patch
Patch1002: 1002-vendor-use-pbkdf2-from-OpenSSL.patch
Patch1003: 1003-vendor-skip-goldenfiles-tests.patch
Patch1004: 1004-vendor-Redacted-Url-in-logs.patch
# Intersection of go_arches and nodejs_arches
ExclusiveArch: %{grafana_arches}
@ -781,6 +782,7 @@ cp -p %{SOURCE8} %{SOURCE9} %{SOURCE10} SELinux
%ifarch s390x i686 armv7hl
%patch -P 1003 -p1
%endif
%patch -P 1004 -p1
%build
@ -1020,6 +1022,9 @@ fi
%{_datadir}/selinux/*/grafana.pp
%changelog
* Tue Jul 16 2024 Sam Feifer <sfeifer@redhat.com> - 10.2.6-6
- Resolves: RHEL-44887
* Tue Jul 9 2024 Sam Feifer <sfeifer@redhat.com> - 10.2.6-5
- Resolves: RHEL-35909
- Resolves: RHEL-43354