Skip to content

Commit 871d35d

Browse files
authored
Merge pull request #199 from SenseUnit/fix_excess_auth_messages
Fix excess logging on password auth failure
2 parents 21a41b5 + a1c2a2f commit 871d35d

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)