Parse and dedup but do not lowercase principals in SSH certs. (#2591)

This commit is contained in:
Jeff Mitchell 2017-04-18 12:21:02 -04:00 committed by GitHub
parent d5f5ecf0ab
commit 0897da93f0

View file

@ -203,8 +203,8 @@ func (b *backend) calculateValidPrincipals(data *framework.FieldData, defaultPri
validPrincipals = defaultPrincipal
}
parsedPrincipals := strutil.ParseDedupAndSortStrings(validPrincipals, ",")
allowedPrincipals := strutil.ParseDedupAndSortStrings(principalsAllowedByRole, ",")
parsedPrincipals := strutil.RemoveDuplicates(strutil.ParseStringSlice(validPrincipals, ","), false)
allowedPrincipals := strutil.RemoveDuplicates(strutil.ParseStringSlice(principalsAllowedByRole, ","), false)
switch {
case len(parsedPrincipals) == 0:
// There is nothing to process