mirror of
https://github.com/CPunch/gopenfusion.git
synced 2024-11-14 03:50:05 +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
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// make sure id && pw are valid
|
||||||
|
if len(Login) < 4 || len(Password) < 4 {
|
||||||
|
return nil, ErrLoginInvalidPassword
|
||||||
|
}
|
||||||
|
|
||||||
var account Account
|
var account Account
|
||||||
row.Next()
|
row.Next()
|
||||||
if err := sqlscan.ScanRow(&account, row); err != nil {
|
if err := sqlscan.ScanRow(&account, row); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user