mirror of
https://github.com/minio/minio.git
synced 2024-12-25 22:55:54 -05:00
reuse sha256 in config GetSettings (#16188)
This commit is contained in:
parent
ebe395788b
commit
8edc2faaa9
@ -506,14 +506,13 @@ func (r *Config) GetSettings() madmin.OpenIDSettings {
|
|||||||
if !r.Enabled {
|
if !r.Enabled {
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
h := sha256.New()
|
||||||
for arn, provCfg := range r.arnProviderCfgsMap {
|
for arn, provCfg := range r.arnProviderCfgsMap {
|
||||||
hashedSecret := ""
|
hashedSecret := ""
|
||||||
{
|
{
|
||||||
h := sha256.New()
|
h.Reset()
|
||||||
h.Write([]byte(provCfg.ClientSecret))
|
h.Write([]byte(provCfg.ClientSecret))
|
||||||
bs := h.Sum(nil)
|
hashedSecret = base64.RawURLEncoding.EncodeToString(h.Sum(nil))
|
||||||
hashedSecret = base64.RawURLEncoding.EncodeToString(bs)
|
|
||||||
}
|
}
|
||||||
if arn != DummyRoleARN {
|
if arn != DummyRoleARN {
|
||||||
if res.Roles == nil {
|
if res.Roles == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user