Mybatis-PageHelper icon indicating copy to clipboard operation
Mybatis-PageHelper copied to clipboard

Sql Injection Problem

Open Virusday opened this issue 3 years ago • 2 comments

作者您好,我在pageHelper的其他方法上也找到了一些sql的问题,这些参数容易在外部进行传入。 PageHelper.startPage(1, 20).setCountColumn(keyword); 这个方法在您的测试样例中有写到。 setCountColumn方法keyword参数如果是外部传入,会导致sql注入的问题。 期待您的回复。

Hello, author. I also found some SQL problems in other methods of PageHelper. These parameters are easy to be passed in externally. PageHelper. startPage(1, 20). setCountColumn(keyword); This method is written in your test sample. If the keyword parameter of setcountcolumn method is imported externally, it will cause SQL injection problems. I'm looking forward to your reply.

Virusday avatar Jul 13 '22 02:07 Virusday

这个字段是给后端使用的,常用的值就是 *, 0, 1

为了避免有人故意制造业务漏洞,后续会限制这里可用的值。

abel533 avatar Jul 13 '22 08:07 abel533

感谢您的回复。

Virusday avatar Jul 13 '22 09:07 Virusday