/[LeafOK_CVS]/fenglin/bbs/user_login_service.php
ViewVC logotype

Diff of /fenglin/bbs/user_login_service.php

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

Revision 1.1 by sysadm, Mon Mar 31 14:09:27 2025 UTC Revision 1.4 by sysadm, Tue Apr 1 03:38:16 2025 UTC
# Line 29  Line 29 
29          header("Content-Type:application/json; charset=utf-8");          header("Content-Type:application/json; charset=utf-8");
30    
31          // Validate input data          // Validate input data
32            if (!preg_match("/^[A-Za-z][A-Za-z0-9]{2,11}$/", $username))
         if (!preg_match("/^[A-Za-z][A-Za-z0-9]{4,11}$/", $username))  
33          {          {
34                  $result_set["return"]["code"] = -1;                  $result_set["return"]["code"] = -1;
35                  array_push($result_set["return"]["errorFields"], array(                  array_push($result_set["return"]["errorFields"], array(
# Line 50  Line 49 
49    
50          if ($ch_passwd)          if ($ch_passwd)
51          {          {
52                  if (!preg_match("/^[A-Za-z0-9]{5,12}$/", $password_new))                  if (!preg_match("/^[A-Za-z0-9]{6,12}$/", $password_new))
53                  {                  {
54                          $result_set["return"]["code"] = -1;                          $result_set["return"]["code"] = -1;
55                          array_push($result_set["return"]["errorFields"], array(                          array_push($result_set["return"]["errorFields"], array(
# Line 155  Line 154 
154                          if ($row["err_count"] >= 5)                          if ($row["err_count"] >= 5)
155                          {                          {
156                                  $result_set["return"]["code"] = 1;                                  $result_set["return"]["code"] = 1;
157                                  $result_set["return"]["message"] = "账号存在多次失败登陆尝试,请输入验证码";                                  $result_set["return"]["message"] = "账户存在多次失败登陆尝试,请输入验证码";
158    
159                                  mysqli_close($db_conn);                                  mysqli_close($db_conn);
160                                  exit(json_encode($result_set));                                  exit(json_encode($result_set));


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

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