forked from forgejo/forgejo
Fix panic when attempt login with non-exist user
This commit is contained in:
parent
bc902b8f74
commit
7c1fbed057
5 changed files with 6 additions and 6 deletions
|
@ -540,7 +540,7 @@ func UserSignIn(username, passowrd string) (*User, error) {
|
|||
}
|
||||
}
|
||||
|
||||
sources := make([]*LoginSource, 3)
|
||||
sources := make([]*LoginSource, 0, 3)
|
||||
if err = x.UseBool().Find(&sources, &LoginSource{IsActived: true}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue