diff options
author | zeripath <art27@cantab.net> | 2021-06-23 22:41:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-23 17:41:39 -0400 |
commit | 5f2ef17fdb7523398f1b84d8a1cad0f24b72667e (patch) | |
tree | 011e80f996ea5ca2dec970b67cbd665ecba3e762 | |
parent | b223d361955f8b722f7dd0b358b2e57e6f359edf (diff) | |
download | gitea-5f2ef17fdb7523398f1b84d8a1cad0f24b72667e.tar.gz gitea-5f2ef17fdb7523398f1b84d8a1cad0f24b72667e.zip |
Don't WARN log UserNotExist errors on ExternalUserLogin failure (#16238)
Instead log these at debug - with warn logging for other errors.
Fix #16235
Signed-off-by: Andrew Thornton <art27@cantab.net>
-rw-r--r-- | models/login_source.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/models/login_source.go b/models/login_source.go index 098b48a8cd..359b562b65 100644 --- a/models/login_source.go +++ b/models/login_source.go @@ -856,7 +856,11 @@ func UserSignIn(username, password string) (*User, error) { return authUser, nil } - log.Warn("Failed to login '%s' via '%s': %v", username, source.Name, err) + if IsErrUserNotExist(err) { + log.Debug("Failed to login '%s' via '%s': %v", username, source.Name, err) + } else { + log.Warn("Failed to login '%s' via '%s': %v", username, source.Name, err) + } } return nil, ErrUserNotExist{user.ID, user.Name, 0} |