From 0897da93f0032f09e270704442bf408ef2c82748 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Tue, 18 Apr 2017 12:21:02 -0400 Subject: [PATCH] Parse and dedup but do not lowercase principals in SSH certs. (#2591) --- 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 22e251316..b5c2e0d3c 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