Fortify代码扫描:Mass Assignment:Insecure Binder Configuration漏洞解决方案

引发该漏洞一般是Controller中把对象作为参数

解决方案:

在Controller类中添加以下代码:

    @InitBinder()
    public void initBinder(WebDataBinder binder) {
        binder.setDisallowedFields(new String[]{});
    }

参考:

https://stackoverflow.com/questions/47945383/how-to-fix-mass-assignment-insecure-binder-configuration-api-abuse-structural/48625284#48625284

https://blog.csdn.net/zengxianxue/article/details/78567544

发布了95 篇原创文章 · 获赞 43 · 访问量 7万+

猜你喜欢

转载自blog.csdn.net/lyxuefeng/article/details/103781349