Fix redact LDAP password properly (#11762)

fixes #11742 previous pull request #11750 fixed only the web trace
This commit is contained in:
Poorna Krishnamoorthy 2021-03-10 11:05:38 -08:00 committed by GitHub
parent 3ffe520643
commit c25e75f0b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {
t.NodeName = host
}
rq := trace.RequestInfo{
Time: time.Now().UTC(),
Proto: r.Proto,
Method: r.Method,
Path: r.URL.Path,
RawQuery: r.URL.RawQuery,
RawQuery: redactLDAPPwd(r.URL.RawQuery),
Client: handlers.GetSourceIP(r),
Headers: reqHeaders,
}