mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-03 00:02:43 +02:00
Only allow local login if password is non-empty (#5906)
This commit is contained in:
1 parent
80098bd752
commit
0f295ababa
2 files changed
+2
-2
No files matched your search
@@ -644,7 +644,7 @@ func UserSignIn(username, password string) (*User, error) {
|
||||
if hasUser {
|
||||
switch user.LoginType {
|
||||
case LoginNoType, LoginPlain, LoginOAuth2:
|
||||
if user.ValidatePassword(password) {
|
||||
if user.IsPasswordSet() && user.ValidatePassword(password) {
|
||||
return user, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user