From 3ad20d8d5b606e4f59c986ad6b1bdd6683922b0d Mon Sep 17 00:00:00 2001 From: Ferenc Fabian Date: Fri, 1 Nov 2019 14:56:41 +0100 Subject: [PATCH] =?UTF-8?q?Case=20sensitive=20Authorization=20header=20wit?= =?UTF-8?q?h=20lower-cased=20scheme=20in=E2=80=A6=20(#6724)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/http.go b/agent/http.go index f655ad9e1..a875e76aa 100644 --- a/agent/http.go +++ b/agent/http.go @@ -892,7 +892,7 @@ func (s *HTTPServer) parseTokenInternal(req *http.Request, token *string) { value := strings.TrimSpace(strings.Join(parts[1:], " ")) // must be "Bearer" - if scheme == "Bearer" { + if strings.ToLower(scheme) == "bearer" { // Since Bearer tokens shouldnt contain spaces (rfc6750#section-2.1) // "value" is tokenized, only the first item is used tok = strings.TrimSpace(strings.Split(value, " ")[0])