mirror of
https://github.com/hashicorp/vault.git
synced 2026-06-09 00:33:28 -04:00
Lower case all policy values in ParsePolicies before processing
This commit is contained in:
parent
0a551b0383
commit
e2927befea
1 changed files with 1 additions and 1 deletions
|
|
@ -9,7 +9,7 @@ func ParsePolicies(policiesRaw string) []string {
|
|||
policies := strings.Split(policiesRaw, ",")
|
||||
defaultFound := false
|
||||
for i, p := range policies {
|
||||
policies[i] = strings.TrimSpace(p)
|
||||
policies[i] = strings.ToLower(strings.TrimSpace(p))
|
||||
// If 'root' policy is present, ignore all other policies.
|
||||
if policies[i] == "root" {
|
||||
policies = []string{"root"}
|
||||
|
|
|
|||
Loading…
Reference in a new issue