aboutsummaryrefslogtreecommitdiffstats
path: root/modules/auth
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-08-01 15:45:26 +0100
committerGitHub <noreply@github.com>2020-08-01 10:45:26 -0400
commitbac65f1b826be84d132420f1acd3a384dd3a8db8 (patch)
tree8743ef323cbec6b0eaae2d0ddff2809220cb1f94 /modules/auth
parentb3e06523c1c4c960b9ef4fd2b2f409166100a9ea (diff)
downloadgitea-bac65f1b826be84d132420f1acd3a384dd3a8db8.tar.gz
gitea-bac65f1b826be84d132420f1acd3a384dd3a8db8.zip
Fix incorrect error logging in Stats indexer and OAuth2 (#12387)
* Fix incorrect logging in oauth2.go Fix #11945 Signed-off-by: Andrew Thornton <art27@cantab.net> * Handle ErrAlreadyInQueue in stats indexer Fix #12380 Signed-off-by: Andrew Thornton <art27@cantab.net> * Fixes type in error message of indexer Add the missing character in the error message. Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lieven Hollevoet <hollie@lika.be>
Diffstat (limited to 'modules/auth')
-rw-r--r--modules/auth/sso/oauth2.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/auth/sso/oauth2.go b/modules/auth/sso/oauth2.go
index e677490b80..6860c12e39 100644
--- a/modules/auth/sso/oauth2.go
+++ b/modules/auth/sso/oauth2.go
@@ -93,7 +93,7 @@ func (o *OAuth2) userIDFromToken(ctx *macaron.Context) int64 {
}
t, err := models.GetAccessTokenBySHA(tokenSHA)
if err != nil {
- if models.IsErrAccessTokenNotExist(err) || models.IsErrAccessTokenEmpty(err) {
+ if !models.IsErrAccessTokenNotExist(err) && !models.IsErrAccessTokenEmpty(err) {
log.Error("GetAccessTokenBySHA: %v", err)
}
return 0