表单有模糊搜索字段时没有判断是否有值,导致生成的sql语句有无效的查询条件`name` like '%%'
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
Research direction
Read plugin/admin/app/controller/Crud.php and locate the doSelect function that handles fuzzy-search fields. Reproduce the example query with an empty name value, then verify that the generated SQL no longer includes an invalid name like '%%' condition when the field has no value.
Written by the indexing model from the issue text.
Description
这是生成的示例sql:select count(*) as aggregate from order where name like '%%'
plugin/admin/app/controller/Crud.php 的 doSelect函数中没有对模糊查询的字段进行非空判断,建议加上非空判断
- Dominant language
- JavaScript
- Stars
- 378
- Forks
- 48
- Avg merge
- 20h 9m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from webman-php/admin
-
js代码错误 Open
Difficulty 1/5 Under an hour Newbie friendliness 70/100
webman-php/admin#125 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
webman-php/admin#101 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
webman-php/admin#135 ·
-
在swoole驱动环境下,会出现问题 Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
webman-php/admin#133 ·
-
layui升级问题 Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
webman-php/admin#129 · 3 comments ·
All issues in webman-php/admin
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Mend: dependency security vulnerability untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100