Fix regression in returning empty value for approle cidrlist. (#13235)

This commit is contained in:
Nick Cabatoff
2021-11-23 12:13:47 -05:00
committed by GitHub
parent 17cb1c601a
commit 783a9e5796
2 changed files with 8 additions and 0 deletions

View File

@@ -118,6 +118,11 @@ func decodeSecretIDStorageEntry(entry *logical.StorageEntry) (*secretIDStorageEn
}
cleanup := func(in []string) []string {
if len(in) == 0 {
// Don't change unnecessarily, if it was empty list leave as empty list
// instead of making it nil.
return in
}
var out []string
for _, s := range in {
out = append(out, parseip.TrimLeadingZeroesCIDR(s))

3
changelog/13235.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:bug
auth/approle: Fix regression where unset cidrlist is returned as nil instead of zero-length array.
```