Skip to content
Permalink
Browse files Browse the repository at this point in the history
修复邮箱验证码错误
修复排序表名安全检测
修复Selectpage编辑时分页大小错误
  • Loading branch information
karsonzhang committed Dec 27, 2019
1 parent 4bb4425 commit e14008c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
13 changes: 10 additions & 3 deletions application/admin/controller/Ajax.php
Expand Up @@ -9,6 +9,7 @@
use think\Config;
use think\Db;
use think\Lang;
use think\Validate;

/**
* Ajax异步请求接口
Expand Down Expand Up @@ -155,6 +156,9 @@ public function weigh()
$field = $this->request->post("field");
//操作的数据表
$table = $this->request->post("table");
if (!Validate::is($table, "alphaDash")) {
$this->error();
}
//主键
$pk = $this->request->post("pk");
//排序的方式
Expand Down Expand Up @@ -214,16 +218,19 @@ public function wipecache()
case 'content':
rmdirs(CACHE_PATH, false);
Cache::clear();
if ($type == 'content')
if ($type == 'content') {
break;
}
case 'template':
rmdirs(TEMP_PATH, false);
if ($type == 'template')
if ($type == 'template') {
break;
}
case 'addons':
Service::refresh();
if ($type == 'addons')
if ($type == 'addons') {
break;
}
}

\think\Hook::listen("wipecache_after");
Expand Down
1 change: 1 addition & 0 deletions application/common/controller/Backend.php
Expand Up @@ -451,6 +451,7 @@ protected function selectpage()
//如果有primaryvalue,说明当前是初始化传值
if ($primaryvalue !== null) {
$where = [$primarykey => ['in', $primaryvalue]];
$pagesize = null;
} else {
$where = function ($query) use ($word, $andor, $field, $searchfield, $custom) {
$logic = $andor == 'AND' ? '&' : '|';
Expand Down
2 changes: 1 addition & 1 deletion application/index/controller/User.php
Expand Up @@ -119,7 +119,7 @@ public function register()
if ($captchaType == 'mobile') {
$captchaResult = Sms::check($mobile, $captcha, 'register');
} elseif ($captchaType == 'email') {
$captchaResult = Ems::check($mobile, $captcha, 'register');
$captchaResult = Ems::check($email, $captcha, 'register');
} elseif ($captchaType == 'wechat') {
$captchaResult = WechatCaptcha::check($captcha, 'register');
} elseif ($captchaType == 'text') {
Expand Down

0 comments on commit e14008c

Please sign in to comment.