mirror of
https://github.com/minio/minio.git
synced 2025-04-01 10:13:42 -04:00
Fix redact LDAP password properly (#11762)
fixes #11742 previous pull request #11750 fixed only the web trace
This commit is contained in:
parent
3ffe520643
commit
c25e75f0b5
@ -197,13 +197,12 @@ func Trace(f http.HandlerFunc, logBody bool, w http.ResponseWriter, r *http.Requ
|
|||||||
if host, _, err := net.SplitHostPort(t.NodeName); err == nil {
|
if host, _, err := net.SplitHostPort(t.NodeName); err == nil {
|
||||||
t.NodeName = host
|
t.NodeName = host
|
||||||
}
|
}
|
||||||
|
|
||||||
rq := trace.RequestInfo{
|
rq := trace.RequestInfo{
|
||||||
Time: time.Now().UTC(),
|
Time: time.Now().UTC(),
|
||||||
Proto: r.Proto,
|
Proto: r.Proto,
|
||||||
Method: r.Method,
|
Method: r.Method,
|
||||||
Path: r.URL.Path,
|
Path: r.URL.Path,
|
||||||
RawQuery: r.URL.RawQuery,
|
RawQuery: redactLDAPPwd(r.URL.RawQuery),
|
||||||
Client: handlers.GetSourceIP(r),
|
Client: handlers.GetSourceIP(r),
|
||||||
Headers: reqHeaders,
|
Headers: reqHeaders,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user