mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
fix sse-kms context unmarshal failure (#13206)
json.Unmarshal expects a pointer receiver, otherwise kms.Context unmarshal fails with lack of pointer receiver, this becomes complicated due to type aliasing over map[string]string - fix it properly.
This commit is contained in:
parent
bf5bfe589f
commit
67596ef0cc
@ -210,8 +210,8 @@ func (ssekms) ParseMetadata(metadata map[string]string) (keyID string, kmsKey []
|
||||
return keyID, kmsKey, sealedKey, ctx, Errorf("The internal KMS context is not base64-encoded")
|
||||
}
|
||||
var json = jsoniter.ConfigCompatibleWithStandardLibrary
|
||||
if err = json.Unmarshal(b, ctx); err != nil {
|
||||
return keyID, kmsKey, sealedKey, ctx, Errorf("The internal sealed KMS context is invalid")
|
||||
if err = json.Unmarshal(b, &ctx); err != nil {
|
||||
return keyID, kmsKey, sealedKey, ctx, Errorf("The internal sealed KMS context is invalid %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user