fix: regression in AssumeRole session policy handling (fixes #12756) (#12773)

This commit is contained in:
Aditya Manthramurthy
2021-07-22 08:42:07 -07:00
committed by GitHub
parent 026a005b64
commit 17a37241f0
2 changed files with 22 additions and 26 deletions

View File

@@ -2353,13 +2353,6 @@ func isAllowedBySessionPolicy(args iampolicy.Args) (hasSessionPolicy bool, isAll
return
}
policyBytes, err := base64.StdEncoding.DecodeString(spolicyStr)
if err != nil {
// Got a malformed base64 string
return
}
spolicyStr = string(policyBytes)
// Check if policy is parseable.
subPolicy, err := iampolicy.ParseConfig(bytes.NewReader([]byte(spolicyStr)))
if err != nil {