mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
fix: set appropriate defaults when new keys added (#8795)
A new key was added in identity_openid recently required explicitly for client to set the optional value without that it would be empty, handle this appropriately. Fixes #8787
This commit is contained in:
@@ -621,6 +621,12 @@ func (c Config) SetKVS(s string, defaultKVS map[string]KVS) error {
|
||||
currKVS, ok := c[subSys][tgt]
|
||||
if !ok {
|
||||
currKVS = defaultKVS[subSys]
|
||||
} else {
|
||||
for _, kv := range defaultKVS[subSys] {
|
||||
if _, ok = currKVS.Lookup(kv.Key); !ok {
|
||||
currKVS.Set(kv.Key, kv.Value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for _, kv := range kvs {
|
||||
|
||||
Reference in New Issue
Block a user