/[LeafOK_CVS]/lbbs/src/login.c
ViewVC logotype

Diff of /lbbs/src/login.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.63 by sysadm, Mon Nov 3 06:21:01 2025 UTC Revision 1.64 by sysadm, Tue Nov 4 11:20:16 2025 UTC
# Line 32  Line 32 
32  #include <mysql/mysql.h>  #include <mysql/mysql.h>
33  #include <sys/param.h>  #include <sys/param.h>
34    
35    static const int BBS_username_min_len = 3; // common len = 5, special len = 3
36    static const int BBS_password_min_len = 5; // legacy len = 5, current len = 6
37    
38  int bbs_login(void)  int bbs_login(void)
39  {  {
40          char username[BBS_username_max_len + 1];          char username[BBS_username_max_len + 1];
# Line 119  int check_user(const char *username, con Line 122  int check_user(const char *username, con
122                          ok = 0;                          ok = 0;
123                  }                  }
124          }          }
125          if (ok && (i < 5 || i > BBS_username_max_len))          if (ok && (i < BBS_username_min_len || i > BBS_username_max_len))
126          {          {
127                  ok = 0;                  ok = 0;
128          }          }
# Line 130  int check_user(const char *username, con Line 133  int check_user(const char *username, con
133                          ok = 0;                          ok = 0;
134                  }                  }
135          }          }
136          if (ok && (i < 5 || i > BBS_password_max_len))          if (ok && (i < BBS_password_min_len || i > BBS_password_max_len))
137          {          {
138                  ok = 0;                  ok = 0;
139          }          }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1