API: Make BasicAuth Prefix case insensitive (#14106)

This commit is contained in:
6543 2020-12-23 19:52:46 +00:00 committed by GitHub
parent a9876bca82
commit 5b958315c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}