From 5b958315c19ab686f351068681631e19eebd1d9a Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 23 Dec 2020 19:52:46 +0000 Subject: [PATCH] API: Make BasicAuth Prefix case insensitive (#14106) --- modules/auth/sso/basic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/auth/sso/basic.go b/modules/auth/sso/basic.go index b5885d38db1..aab4eceebcc 100644 --- a/modules/auth/sso/basic.go +++ b/modules/auth/sso/basic.go @@ -56,7 +56,7 @@ func (b *Basic) VerifyAuthData(ctx *macaron.Context, sess session.Store) *models } auths := strings.Fields(baHead) - if len(auths) != 2 || auths[0] != "Basic" { + if len(auths) != 2 || (auths[0] != "Basic" && auths[0] != "basic") { return nil }