验证码修复
parent
746412fc10
commit
2dc038f0f8
|
@ -5,8 +5,6 @@
|
|||
require_once __DIR__ . '/../application/function.php';
|
||||
require_once APP_ROOT . '/application/header.php';
|
||||
require_once APP_ROOT . '/config/config.guest.php';
|
||||
// 验证登录
|
||||
header("Content-Type: text/html;charset=utf-8");
|
||||
|
||||
// 退出
|
||||
if (isset($_GET['login'])) {
|
||||
|
@ -41,27 +39,35 @@ if (isset($_GET['login'])) {
|
|||
exit(require_once APP_ROOT . '/application/footer.php');
|
||||
}
|
||||
|
||||
// 验证码
|
||||
if ($config['captcha']) {
|
||||
if (isset($_REQUEST['code'])) {
|
||||
session_start();
|
||||
if (strtolower($_REQUEST['code']) !== $_SESSION['code']) {
|
||||
echo '
|
||||
<script>
|
||||
new $.zui.Messager("验证码错误!", {type: "danger" // 定义颜色主题
|
||||
}).show();
|
||||
// 延时2s跳转
|
||||
window.setTimeout("window.location=\'./index.php\'",2000);
|
||||
</script>';
|
||||
|
||||
exit(require_once APP_ROOT . '/application/footer.php');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 提交登录
|
||||
if (isset($_POST['password']) and isset($_POST['user'])) {
|
||||
|
||||
// 验证码
|
||||
if ($config['captcha']) {
|
||||
if (empty($_REQUEST['code'])) {
|
||||
echo '
|
||||
<script>
|
||||
new $.zui.Messager("请填写验证码!", {type: "danger" // 定义颜色主题
|
||||
}).show();
|
||||
// 延时2s跳转
|
||||
window.setTimeout("window.location=\'./index.php\'",2000);
|
||||
</script>';
|
||||
exit(require_once APP_ROOT . '/application/footer.php');
|
||||
} else {
|
||||
session_start();
|
||||
if (strtolower($_REQUEST['code']) !== $_SESSION['code']) {
|
||||
echo '
|
||||
<script>
|
||||
new $.zui.Messager("验证码错误!", {type: "danger" // 定义颜色主题
|
||||
}).show();
|
||||
// 延时2s跳转
|
||||
window.setTimeout("window.location=\'./index.php\'",2000);
|
||||
</script>';
|
||||
exit(require_once APP_ROOT . '/application/footer.php');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$login = _login($_POST['user'], $_POST['password']);
|
||||
$login = json_decode($login, true);
|
||||
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
* 2023-03-04 v2.7.6 dev
|
||||
- 增加删除文件时限定目录
|
||||
- 增加对SVG文件格式过滤 致谢:[xulei1112](https://github.com/xulei1112)
|
||||
- 修复弱类型验证导致的异常登录 致谢:[xulei1112](https://github.com/xulei1112)
|
||||
- 增加对SVG文件格式过滤
|
||||
- 修复弱类型验证导致的异常登录
|
||||
- 修复开启验证码后登录绕过
|
||||
- 更换加密删除链接算法 - 链接更短
|
||||
- 更换存储密码算法为SHA256
|
||||
- 默认不支持SVG文件上传
|
||||
- 完全兼容 PHP5.6-8.0
|
||||
- 本次漏洞修复和代码增强感谢 [xulei1112](https://github.com/xulei1112)
|
||||
|
||||
* 2023-02-24 v2.7.5
|
||||
- 增加定时删除文件
|
||||
|
|
Loading…
Reference in New Issue