1
0
Fork 0
forked from forgejo/forgejo

Fix panic when attempt login with non-exist user

This commit is contained in:
Unknwon 2016-09-01 05:12:34 -04:00
parent bc902b8f74
commit 7c1fbed057
5 changed files with 6 additions and 6 deletions

View file

@ -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
}