mirror of
https://github.com/CPunch/gopenfusion.git
synced 2024-11-21 15:00:07 +00:00
Login && Password need to be at least 4 long
This commit is contained in:
parent
afd5c9ef23
commit
c4d885cf6d
@ -54,6 +54,11 @@ func (db *DBHandler) TryLogin(Login, Password string) (*Account, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// make sure id && pw are valid
|
||||
if len(Login) < 4 || len(Password) < 4 {
|
||||
return nil, ErrLoginInvalidPassword
|
||||
}
|
||||
|
||||
var account Account
|
||||
row.Next()
|
||||
if err := sqlscan.ScanRow(&account, row); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user