|  
 
 
Session Cookie without Secure flag set  
最近用了一款测试软件 Acunetix Web Vulnerability Scanner7.0   提示网站有个漏洞  Session Cookie without Secure flag set   
以前没有用过 这个软件 不晓得怎么解决这个问题~~~请问一下怎么解决啊   网站里面只用了session 没用cookie Session数据保存在服务器端, 但是每一个客户端都需要保存一个SessionID, SessionID保存在Cookies中, 关闭浏览器时过期. 在向服务器发送的HTTP请求中会包含SessionID, 服务器端根据SessionID获取获取此用户的Session信息. cookie 
如果你在Servlet3或者更新的环境中开发,只需要在web.xml简单的配置就能实现这种效果。你要在web.xml中添加如下片段:     <session-config>       <cookie-config>         <http-only>true</http-only>       </cookie-config>     </session-config>     而且如果使用了secure标识,配置应该如下     <session-config>       <cookie-config>         <http-only>true</http-only>         <secure>true</secure>       </cookie-config>     </session-config>  
 |