mirror of
https://github.com/go-gitea/gitea
synced 2024-09-27 00:37:49 +02:00
Compare commits
9 Commits
68bd60489f
...
156b79a123
Author | SHA1 | Date | |
---|---|---|---|
|
156b79a123 | ||
|
55d5a74bb3 | ||
|
f6586943cb | ||
|
7eaf283b0c | ||
|
4d9f4ed5cd | ||
|
55afd39390 | ||
|
1d34d436c2 | ||
|
280861f31e | ||
|
814ca03be8 |
@ -1731,6 +1731,7 @@ issues.dependency.add_error_dep_not_same_repo=Ambas as questões têm que estar
|
||||
issues.review.self.approval=Não pode aprovar o seu próprio pedido de integração.
|
||||
issues.review.self.rejection=Não pode solicitar modificações sobre o seu próprio pedido de integração.
|
||||
issues.review.approve=aprovou estas modificações %s
|
||||
issues.review.comment=reviu %s
|
||||
issues.review.dismissed=descartou a revisão de %s %s
|
||||
issues.review.dismissed_label=Descartada
|
||||
issues.review.left_comment=deixou um comentário
|
||||
|
@ -42,16 +42,13 @@ func (source *Source) Authenticate(ctx context.Context, user *user_model.User, u
|
||||
}
|
||||
|
||||
if err := Authenticate(auth, source); err != nil {
|
||||
// Check standard error format first,
|
||||
// then fallback to worse case.
|
||||
tperr, ok := err.(*textproto.Error)
|
||||
if (ok && tperr.Code == 535) ||
|
||||
strings.Contains(err.Error(), "Username and Password not accepted") {
|
||||
return nil, user_model.ErrUserNotExist{Name: userName}
|
||||
}
|
||||
if (ok && tperr.Code == 534) ||
|
||||
strings.Contains(err.Error(), "Application-specific password required") {
|
||||
return nil, user_model.ErrUserNotExist{Name: userName}
|
||||
// when authentication via smtp fails, wraps ErrInvalidArgument
|
||||
// with the original textproto.Error as the cause,
|
||||
// so it will show username_password_incorrect to the user
|
||||
// while log the original error so that admin can check.
|
||||
// see: routers/web/auth/auth.go SiginPost
|
||||
if tperr, ok := err.(*textproto.Error); ok {
|
||||
return nil, errors.Join(util.ErrInvalidArgument, tperr)
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user