Spring MVC中对http请求参数进行对象绑定,造成漏洞的解决办法
利用@InitBinder注解和WebDataBinder对允许的绑定到对象的属性进行设置,代码如下
在Controller层编写
设置一个允许绑定的属性数组
final String[] ALLOW_FIELD = new String[]{"token","kb_date","professionKey","quotaTypeKey","rpt_id","handPwd","userN...
原创
2019-07-19 16:57:38 ·
1523 阅读 ·
2 评论