| 3 |
* login |
* login |
| 4 |
* - user authentication and online status manager |
* - user authentication and online status manager |
| 5 |
* |
* |
| 6 |
* Copyright (C) 2004-2025 by Leaflet <leaflet@leafok.com> |
* Copyright (C) 2004-2025 Leaflet <leaflet@leafok.com> |
| 7 |
*/ |
*/ |
| 8 |
|
|
| 9 |
#include "bbs.h" |
#include "bbs.h" |
| 27 |
static const int BBS_username_min_len = 3; // common len = 5, special len = 3 |
static const int BBS_username_min_len = 3; // common len = 5, special len = 3 |
| 28 |
static const int BBS_password_min_len = 5; // legacy len = 5, current len = 6 |
static const int BBS_password_min_len = 5; // legacy len = 5, current len = 6 |
| 29 |
|
|
| 30 |
|
static const int BBS_allowed_login_failures_within_interval = 10; |
| 31 |
|
static const int BBS_login_failures_count_interval = 10; // minutes |
| 32 |
|
static const int BBS_allowed_login_failures_per_account = 3; |
| 33 |
|
|
| 34 |
|
const int BBS_login_retry_times = 3; |
| 35 |
|
|
| 36 |
int bbs_login(void) |
int bbs_login(void) |
| 37 |
{ |
{ |
| 38 |
char username[BBS_username_max_len + 1]; |
char username[BBS_username_max_len + 1]; |