From c4cc3fd96e51c5018b0e5665fd8b20419cc8bf80 Mon Sep 17 00:00:00 2001 From: Chris Hoffman Date: Wed, 19 Apr 2017 10:36:45 -0400 Subject: [PATCH] Do not lowercase groups attached to users in ldap (#2613) --- builtin/credential/ldap/path_users.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/credential/ldap/path_users.go b/builtin/credential/ldap/path_users.go index 623678852180..605f779cb3d5 100644 --- a/builtin/credential/ldap/path_users.go +++ b/builtin/credential/ldap/path_users.go @@ -101,7 +101,7 @@ func (b *backend) pathUserRead( func (b *backend) pathUserWrite( req *logical.Request, d *framework.FieldData) (*logical.Response, error) { name := d.Get("name").(string) - groups := strutil.ParseDedupAndSortStrings(d.Get("groups").(string), ",") + groups := strutil.RemoveDuplicates(strutil.ParseStringSlice(d.Get("groups").(string), ","), false) policies := policyutil.ParsePolicies(d.Get("policies").(string)) for i, g := range groups { groups[i] = strings.TrimSpace(g)