mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 20:36:26 +02:00
Fix panic if passing "rules" via sys/policies/acl (#4705)
This commit is contained in:
parent
8df30fc414
commit
4e71de3393
@ -2610,7 +2610,7 @@ func (b *SystemBackend) handlePoliciesSet(policyType PolicyType) framework.Opera
|
||||
}
|
||||
|
||||
policy.Raw = data.Get("policy").(string)
|
||||
if policy.Raw == "" {
|
||||
if policy.Raw == "" && policyType == PolicyTypeACL && strings.HasPrefix(req.Path, "policy") {
|
||||
policy.Raw = data.Get("rules").(string)
|
||||
if resp == nil {
|
||||
resp = &logical.Response{}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user