]> source.dussan.org Git - gitea.git/commitdiff
Minor readability patch. (#17627)
authorMichael Grigoryan <56165400+michaelgrigoryan25@users.noreply.github.com>
Fri, 12 Nov 2021 23:27:18 +0000 (03:27 +0400)
committerGitHub <noreply@github.com>
Fri, 12 Nov 2021 23:27:18 +0000 (18:27 -0500)
services/auth/basic.go

index 0c400b6b5329ade7623d95bf9a2ff0d96a2b8d48..d7f889cbdc8e26ab3ee7e3d9611713225ecf45c6 100644 (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
        }