From 92a2eba036c34646c63775a1afd8b0b548706515 Mon Sep 17 00:00:00 2001 From: Andreas Heider Date: Fri, 3 Aug 2018 10:18:43 +0100 Subject: [PATCH] Make priority of header over body more explicit --- path_login.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/path_login.go b/path_login.go index 884e813c..5606db12 100644 --- a/path_login.go +++ b/path_login.go @@ -100,10 +100,12 @@ func (b *backend) pathLogin(ctx context.Context, req *logical.Request, d *framew // Clean ldap connection defer ldapConnection.Close() - authorizationString := d.Get("authorization").(string) + authorizationString := "" authorizationHeaders := req.Headers["Authorization"] if len(authorizationHeaders) > 0 { authorizationString = authorizationHeaders[0] + } else { + authorizationString = d.Get("authorization").(string) } s := strings.SplitN(authorizationString, " ", 2)