@@ -18,7 +18,7 @@ $row = array(); | |||||
if ($dopost == "toadmin") { | if ($dopost == "toadmin") { | ||||
$pwd = trim($pwd); | $pwd = trim($pwd); | ||||
if ($pwd != '' && preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd)) { | if ($pwd != '' && preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd)) { | ||||
ShowMsg('密码不合法,使用[0-9a-zA-Z_@!.-]范围以内字符', '-1'); | |||||
ShowMsg('密码不合法,仅限使用[0-9a-zA-Z_@!.-]', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); | $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); | ||||
@@ -15,7 +15,7 @@ if (empty($dopost)) $dopost = ''; | |||||
if ($dopost == 'add') { | if ($dopost == 'add') { | ||||
CheckCSRF(); | CheckCSRF(); | ||||
if (preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd) || preg_match("#[^0-9a-zA-Z_@!\.-]#", $userid)) { | if (preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd) || preg_match("#[^0-9a-zA-Z_@!\.-]#", $userid)) { | ||||
ShowMsg('密码或账号不合法,使用[0-9a-zA-Z_@!.-]范围以内字符', '-1'); | |||||
ShowMsg('密码或账号不合法,仅限使用[0-9a-zA-Z_@!.-]', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); | $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); | ||||
@@ -17,11 +17,11 @@ if ($dopost == 'saveedit') { | |||||
CheckCSRF(); | CheckCSRF(); | ||||
$pwd = trim($pwd); | $pwd = trim($pwd); | ||||
if ($pwd != '' && preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd)) { | if ($pwd != '' && preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd)) { | ||||
ShowMsg('密码不合法,使用[0-9a-zA-Z_@!.-]范围以内字符', '-1'); | |||||
ShowMsg('密码不合法,仅限使用[0-9a-zA-Z_@!.-]', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (preg_match("#[^0-9a-zA-Z_@!\.-]#", $userid)) { | if (preg_match("#[^0-9a-zA-Z_@!\.-]#", $userid)) { | ||||
ShowMsg('账号不合法,使用[0-9a-zA-Z_@!.-]范围以内字符', '-1'); | |||||
ShowMsg('账号不合法,仅限使用[0-9a-zA-Z_@!.-]', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); | $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); | ||||
@@ -37,7 +37,7 @@ | |||||
<td>密码:</td> | <td>密码:</td> | ||||
<td> | <td> | ||||
<input type="text" name="pwd" id="pwd" class="admin-input-sm"> | <input type="text" name="pwd" id="pwd" class="admin-input-sm"> | ||||
<span>(留空则不修改,使用[0-9a-zA-Z_@!.-]范围以内字符)</span> | |||||
<span>(留空则不修改,仅限使用[0-9a-zA-Z_@!.-])</span> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -31,7 +31,7 @@ | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>密码:</td> | <td>密码:</td> | ||||
<td><input type="text" name="pwd" id="pwd" class="admin-input-sm">(留空则不修改,使用[0-9a-zA-Z_@!.-]范围以内字符)</td> | |||||
<td><input type="text" name="pwd" id="pwd" class="admin-input-sm">(留空则不修改,仅限使用[0-9a-zA-Z_@!.-])</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>类型:</td> | <td>类型:</td> | ||||
@@ -23,7 +23,7 @@ | |||||
<td width="260">账号:</td> | <td width="260">账号:</td> | ||||
<td> | <td> | ||||
<input type="text" name="userid" id="userid" class="admin-input-sm"> | <input type="text" name="userid" id="userid" class="admin-input-sm"> | ||||
<span>(使用[0-9a-zA-Z_@!.-]范围以内字符)</span> | |||||
<span>(仅限使用[0-9a-zA-Z_@!.-])</span> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -37,7 +37,7 @@ | |||||
<td>密码:</td> | <td>密码:</td> | ||||
<td> | <td> | ||||
<input type="text" name="pwd" id="pwd" class="admin-input-sm"> | <input type="text" name="pwd" id="pwd" class="admin-input-sm"> | ||||
<span>(使用[0-9a-zA-Z_@!.-]范围以内字符)</span> | |||||
<span>(仅限使用[0-9a-zA-Z_@!.-])</span> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -33,7 +33,7 @@ | |||||
<td>密码:</td> | <td>密码:</td> | ||||
<td> | <td> | ||||
<input type="text" name="pwd" id="pwd" class="admin-input-sm"> | <input type="text" name="pwd" id="pwd" class="admin-input-sm"> | ||||
<span>(留空则不修改,使用[0-9a-zA-Z_@!.-]范围以内字符)</span> | |||||
<span>(留空则不修改,仅限使用[0-9a-zA-Z_@!.-])</span> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -90,12 +90,12 @@ | |||||
<div class="form-group"> | <div class="form-group"> | ||||
<label for="adminuser" class="form-label">管理员账号</label> | <label for="adminuser" class="form-label">管理员账号</label> | ||||
<input type="text" name="adminuser" id="adminuser" class="form-control" placeholder="admin"> | <input type="text" name="adminuser" id="adminuser" class="form-control" placeholder="admin"> | ||||
<div class="form-text">使用[0-9a-zA-Z_@!.-]范围以内字符</div> | |||||
<div class="form-text">仅限使用[0-9a-zA-Z_@!.-]</div> | |||||
</div> | </div> | ||||
<div class="form-group"> | <div class="form-group"> | ||||
<label for="adminpwd" class="form-label">管理员密码</label> | <label for="adminpwd" class="form-label">管理员密码</label> | ||||
<input type="text" name="adminpwd" id="adminpwd" class="form-control" placeholder="admin"> | <input type="text" name="adminpwd" id="adminpwd" class="form-control" placeholder="admin"> | ||||
<div class="form-text">使用[0-9a-zA-Z_@!.-]范围以内字符</div> | |||||
<div class="form-text">仅限使用[0-9a-zA-Z_@!.-]</div> | |||||
</div> | </div> | ||||
<div class="text-right"><button type="submit" class="btn btn-success">安装</button></div> | <div class="text-right"><button type="submit" class="btn btn-success">安装</button></div> | ||||
</form> | </form> | ||||
@@ -45,7 +45,7 @@ function CheckUserID($uid, $msgtitle = '账号', $ckhas = TRUE) | |||||
} | } | ||||
} else { | } else { | ||||
if (preg_match("/[^0-9a-z@\.-]/i", $ck_uid[$i])) { | if (preg_match("/[^0-9a-z@\.-]/i", $ck_uid[$i])) { | ||||
return $msgtitle.'使用[0-9a-zA-Z_@!.-]范围以内字符'; | |||||
return $msgtitle.'仅限使用[0-9a-zA-Z_@!.-]'; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -48,7 +48,7 @@ if ($step == 1) { | |||||
exit(); | exit(); | ||||
} | } | ||||
if (preg_match("#[^0-9a-zA-Z_@!\.-]#", $userid)) { | if (preg_match("#[^0-9a-zA-Z_@!\.-]#", $userid)) { | ||||
ShowMsg('账号不合法,使用[0-9a-zA-Z_@!.-]范围以内字符', '-1'); | |||||
ShowMsg('账号不合法,仅限使用[0-9a-zA-Z_@!.-]', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
if ($pwdc != $pwd) { | if ($pwdc != $pwd) { | ||||