Resolves: RHEL-44874
This commit is contained in:
parent
1c62e19837
commit
338fd7eb4a
51
1004-vendor-Redacted-Url-in-logs.patch
Normal file
51
1004-vendor-Redacted-Url-in-logs.patch
Normal 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.
|
@ -25,7 +25,7 @@ end}
|
|||||||
|
|
||||||
Name: grafana
|
Name: grafana
|
||||||
Version: 10.2.6
|
Version: 10.2.6
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: Metrics dashboard and graph editor
|
Summary: Metrics dashboard and graph editor
|
||||||
License: AGPL-3.0-only
|
License: AGPL-3.0-only
|
||||||
URL: https://grafana.org
|
URL: https://grafana.org
|
||||||
@ -82,6 +82,7 @@ Patch10: 0010-remove-bcrypt-references.patch
|
|||||||
Patch1001: 1001-vendor-patch-removed-backend-crypto.patch
|
Patch1001: 1001-vendor-patch-removed-backend-crypto.patch
|
||||||
Patch1002: 1002-vendor-use-pbkdf2-from-OpenSSL.patch
|
Patch1002: 1002-vendor-use-pbkdf2-from-OpenSSL.patch
|
||||||
Patch1003: 1003-vendor-skip-goldenfiles-tests.patch
|
Patch1003: 1003-vendor-skip-goldenfiles-tests.patch
|
||||||
|
Patch1004: 1004-vendor-Redacted-Url-in-logs.patch
|
||||||
|
|
||||||
# Intersection of go_arches and nodejs_arches
|
# Intersection of go_arches and nodejs_arches
|
||||||
ExclusiveArch: %{grafana_arches}
|
ExclusiveArch: %{grafana_arches}
|
||||||
@ -784,6 +785,7 @@ cp -p %{SOURCE8} %{SOURCE9} %{SOURCE10} SELinux
|
|||||||
%ifarch s390x i686 armv7hl
|
%ifarch s390x i686 armv7hl
|
||||||
%patch -P 1003 -p1
|
%patch -P 1003 -p1
|
||||||
%endif
|
%endif
|
||||||
|
%patch -P 1004 -p1
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -1024,6 +1026,9 @@ fi
|
|||||||
%{_datadir}/selinux/*/grafana.pp
|
%{_datadir}/selinux/*/grafana.pp
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 16 2024 Sam Feifer <sfeifer@redhat.com> 10.2.6-4
|
||||||
|
- Resolves RHEL-44874
|
||||||
|
|
||||||
* Tue Jul 9 2024 Lauren Chilton <lchilton@redhat.com> 10.2.6-3
|
* Tue Jul 9 2024 Lauren Chilton <lchilton@redhat.com> 10.2.6-3
|
||||||
- Resolves RHEL-35937
|
- Resolves RHEL-35937
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user