0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-23 02:28:15 +01:00

Minor readability patch. (#17627)

This commit is contained in:
Michael Grigoryan 2021-11-13 03:27:18 +04:00 committed by GitHub
parent df64fa4865
commit 47448083a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,7 +50,7 @@ func (b *Basic) Verify(req *http.Request, w http.ResponseWriter, store DataStore
}
auths := strings.SplitN(baHead, " ", 2)
if len(auths) != 2 || (auths[0] != "Basic" && auths[0] != "basic") {
if len(auths) != 2 || (strings.ToLower(auths[0]) != "basic") {
return nil
}