fix MINIO_KMS_SECRET_KEY env. variable parsing (#12200)

This commit fixes a bug when parsing the env. variable
`MINIO_KMS_SECRET_KEY`. Before, the env. variable
name - instead of its value - was parsed. This (obviously)
did not work properly.

This commit fixes this.

Signed-off-by: Andreas Auernhammer <aead@mail.de>
This commit is contained in:
Andreas Auernhammer authored and GitHub committed 2021-04-30 18:47:30 -07:00
1 parent 0d3ddf7286
commit 4815f92fa8
3 files changed
+28 -33

No files matched your search

+1 -1
View File
@@ -340,7 +340,7 @@ func handleCommonEnvVars() {
}
if env.IsSet(config.EnvKMSSecretKey) {
GlobalKMS, err = kms.Parse(config.EnvKMSSecretKey)
GlobalKMS, err = kms.Parse(env.Get(config.EnvKMSSecretKey, ""))
if err != nil {
logger.Fatal(err, "Unable to parse the KMS secret key inherited from the shell environment")
}