mirror of
https://github.com/hashicorp/vault.git
synced 2026-06-09 08:55:13 -04:00
Fix panic if passing "rules" via sys/policies/acl (#4705)
This commit is contained in:
parent
8df30fc414
commit
4e71de3393
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Reference in a new issue