转载--小白
近期发现较多会员信息泄露的安全问题,主要问题出现在没有对redirect的url做出限制
如: http://www.andylau.com/member/login.jhtml?redirectUrl=http://www.shit.com/shit/a.asp
该链接没有限制redirectUrl
免登陆获取了用户nick后返回给了第三方造成了漏洞的利用
防范方法:
1.在项目中所有redirect限制只能跳转至白名单网站
2.测试方法: 登陆url http://www.andylau.com/member/login.jhtml
在url后加参数如下:
http://www.andylau.com/member/login.jhtml?redirectUrl=http://www.google.cn
若跳转至Google就是没有做跳转的限制