修复邮箱验证码错误
修复排序表名安全检测 修复Selectpage编辑时分页大小错误
正在显示
3 个修改的文件
包含
12 行增加
和
4 行删除
@@ -9,6 +9,7 @@ use think\Cache; | @@ -9,6 +9,7 @@ use think\Cache; | ||
9 | use think\Config; | 9 | use think\Config; |
10 | use think\Db; | 10 | use think\Db; |
11 | use think\Lang; | 11 | use think\Lang; |
12 | +use think\Validate; | ||
12 | 13 | ||
13 | /** | 14 | /** |
14 | * Ajax异步请求接口 | 15 | * Ajax异步请求接口 |
@@ -155,6 +156,9 @@ class Ajax extends Backend | @@ -155,6 +156,9 @@ class Ajax extends Backend | ||
155 | $field = $this->request->post("field"); | 156 | $field = $this->request->post("field"); |
156 | //操作的数据表 | 157 | //操作的数据表 |
157 | $table = $this->request->post("table"); | 158 | $table = $this->request->post("table"); |
159 | + if (!Validate::is($table, "alphaDash")) { | ||
160 | + $this->error(); | ||
161 | + } | ||
158 | //主键 | 162 | //主键 |
159 | $pk = $this->request->post("pk"); | 163 | $pk = $this->request->post("pk"); |
160 | //排序的方式 | 164 | //排序的方式 |
@@ -214,17 +218,20 @@ class Ajax extends Backend | @@ -214,17 +218,20 @@ class Ajax extends Backend | ||
214 | case 'content': | 218 | case 'content': |
215 | rmdirs(CACHE_PATH, false); | 219 | rmdirs(CACHE_PATH, false); |
216 | Cache::clear(); | 220 | Cache::clear(); |
217 | - if ($type == 'content') | 221 | + if ($type == 'content') { |
218 | break; | 222 | break; |
223 | + } | ||
219 | case 'template': | 224 | case 'template': |
220 | rmdirs(TEMP_PATH, false); | 225 | rmdirs(TEMP_PATH, false); |
221 | - if ($type == 'template') | 226 | + if ($type == 'template') { |
222 | break; | 227 | break; |
228 | + } | ||
223 | case 'addons': | 229 | case 'addons': |
224 | Service::refresh(); | 230 | Service::refresh(); |
225 | - if ($type == 'addons') | 231 | + if ($type == 'addons') { |
226 | break; | 232 | break; |
227 | } | 233 | } |
234 | + } | ||
228 | 235 | ||
229 | \think\Hook::listen("wipecache_after"); | 236 | \think\Hook::listen("wipecache_after"); |
230 | $this->success(); | 237 | $this->success(); |
@@ -451,6 +451,7 @@ class Backend extends Controller | @@ -451,6 +451,7 @@ class Backend extends Controller | ||
451 | //如果有primaryvalue,说明当前是初始化传值 | 451 | //如果有primaryvalue,说明当前是初始化传值 |
452 | if ($primaryvalue !== null) { | 452 | if ($primaryvalue !== null) { |
453 | $where = [$primarykey => ['in', $primaryvalue]]; | 453 | $where = [$primarykey => ['in', $primaryvalue]]; |
454 | + $pagesize = null; | ||
454 | } else { | 455 | } else { |
455 | $where = function ($query) use ($word, $andor, $field, $searchfield, $custom) { | 456 | $where = function ($query) use ($word, $andor, $field, $searchfield, $custom) { |
456 | $logic = $andor == 'AND' ? '&' : '|'; | 457 | $logic = $andor == 'AND' ? '&' : '|'; |
@@ -119,7 +119,7 @@ class User extends Frontend | @@ -119,7 +119,7 @@ class User extends Frontend | ||
119 | if ($captchaType == 'mobile') { | 119 | if ($captchaType == 'mobile') { |
120 | $captchaResult = Sms::check($mobile, $captcha, 'register'); | 120 | $captchaResult = Sms::check($mobile, $captcha, 'register'); |
121 | } elseif ($captchaType == 'email') { | 121 | } elseif ($captchaType == 'email') { |
122 | - $captchaResult = Ems::check($mobile, $captcha, 'register'); | 122 | + $captchaResult = Ems::check($email, $captcha, 'register'); |
123 | } elseif ($captchaType == 'wechat') { | 123 | } elseif ($captchaType == 'wechat') { |
124 | $captchaResult = WechatCaptcha::check($captcha, 'register'); | 124 | $captchaResult = WechatCaptcha::check($captcha, 'register'); |
125 | } elseif ($captchaType == 'text') { | 125 | } elseif ($captchaType == 'text') { |
-
请 注册 或 登录 后发表评论