mirror of
https://github.com/minio/minio.git
synced 2025-11-20 18:06:10 -05:00
Do not send envVars in ServerInfo() (#4422)
Sending envVars along with access and secret exposes the entire minio server's sensitive information. This will be an unexpected situation for all users. If at all we need to look for things like if credentials are set through env, we should only have access to only this information not the entire set of system envs.
This commit is contained in:
@@ -50,12 +50,12 @@ type WebGenericRep struct {
|
||||
|
||||
// ServerInfoRep - server info reply.
|
||||
type ServerInfoRep struct {
|
||||
MinioVersion string
|
||||
MinioMemory string
|
||||
MinioPlatform string
|
||||
MinioRuntime string
|
||||
MinioEnvVars []string
|
||||
UIVersion string `json:"uiVersion"`
|
||||
MinioVersion string
|
||||
MinioMemory string
|
||||
MinioPlatform string
|
||||
MinioRuntime string
|
||||
MinioGlobalInfo map[string]interface{}
|
||||
UIVersion string `json:"uiVersion"`
|
||||
}
|
||||
|
||||
// ServerInfo - get server info.
|
||||
@@ -80,8 +80,8 @@ func (web *webAPIHandlers) ServerInfo(r *http.Request, args *WebGenericArgs, rep
|
||||
runtime.GOARCH)
|
||||
goruntime := fmt.Sprintf("Version: %s | CPUs: %s", runtime.Version(), strconv.Itoa(runtime.NumCPU()))
|
||||
|
||||
reply.MinioEnvVars = os.Environ()
|
||||
reply.MinioVersion = Version
|
||||
reply.MinioGlobalInfo = getGlobalInfo()
|
||||
reply.MinioMemory = mem
|
||||
reply.MinioPlatform = platform
|
||||
reply.MinioRuntime = goruntime
|
||||
|
||||
Reference in New Issue
Block a user