fix: hostname inside --console-address not anonymized (#12743)

In case of non-distributed setup, if the server start command contains a
`--console-address` flag and its value contains a hostname, it is not
getting anonymized.

Fixed by replacing the console host also with `server1`
This commit is contained in:
Shireesh Anjal 2021-07-20 03:46:26 +05:30 committed by GitHub
parent c25ad94b7e
commit fa98014bbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1655,7 +1655,8 @@ func (a adminAPIHandlers) HealthInfoHandler(w http.ResponseWriter, r *http.Reque
anonymizeCmdLine := func(cmdLine string) string {
if !globalIsDistErasure {
// FS mode - single server - hard code to `server1`
return strings.Replace(cmdLine, globalLocalNodeName, "server1", -1)
anonCmdLine := strings.Replace(cmdLine, globalLocalNodeName, "server1", -1)
return strings.Replace(anonCmdLine, globalMinioConsoleHost, "server1", -1)
}
// Server start command regex groups: