Skip to content

Commit a1c2a2f

Browse files
committed
fix excess logging on password auth failure
1 parent 21a41b5 commit a1c2a2f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

auth/common.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ func requireBasicAuth(ctx context.Context, wr http.ResponseWriter, req *http.Req
3939
}
4040

4141
func tryValid(auth Auth, logger *clog.CondLogger, user, password, userAddr string) bool {
42+
if auth == nil {
43+
return false
44+
}
4245
if validator, ok := auth.(interface {
4346
Valid(string, string, string) bool
4447
}); ok {

0 commit comments

Comments
 (0)