From fb15224ed71a417c91d6b2185cc9cab14d49cb49 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Thu, 13 Apr 2017 16:34:43 -0400 Subject: [PATCH] Parse and dedup but do not lowercase principals in SSH certs. --- builtin/logical/ssh/path_sign.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/logical/ssh/path_sign.go b/builtin/logical/ssh/path_sign.go index 22e2513162f2..b5c2e0d3c01d 100644 --- a/builtin/logical/ssh/path_sign.go +++ b/builtin/logical/ssh/path_sign.go @@ -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