【发布时间】:2015-12-07 04:56:39
【问题描述】:
对我的 tomcat 安装执行的安全扫描报告了这个问题:
fileDownloaded cookie 通过安全连接发送,但没有设置“安全”属性。 “安全”属性告诉浏览器仅通过使用 SSL 保护的连接传输 cookie。这可以防止值被无意中通过未加密的 HTTP 连接发送。
我已经在 server.xml 中设置了 secure="true" 并在 context.xml 中设置了 useHttpOnly="true"
这解决了所有实际页面上的问题,它们现在都在标题中显示 Set Cookie secure
但是这个文件Downlaoded cookie是报告问题的最后一个挥之不去的位。
我到处搜索,似乎找不到任何其他有此问题的人的参考。
我开始怀疑这是否真的是 iPlanet Web 服务器而不是 Tomcat 应用服务器的配置问题
请求
GET ------ HTTP/1.1
Host: www
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0
Cookie: JSESSIONID=*****
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: en-US,en;q=0.5
Referer: https://********dashboard.page
Connection: keep-alive
Content-Length: 0
回应
HTTP/1.1 200 OK
Server: none
Date: Sun, 23 Aug 2015 05:08:05 GMT
X-frame-options: SAMEORIGIN
Location:
Proxy-agent: Oracle-iPlanet-Web-Server/7.0
Content-disposition: attachment; filename="table_export.xls"
Set-cookie: fileDownloaded=true;Version=1
Content-type: application/vnd.ms-excel
Via: 1.1 *******
Content-Length: 4608
【问题讨论】:
-
除非 cookie 是敏感的,否则仅将其设置为 TLS/SSL 没有任何优势。攻击者可以收集的唯一可能信息可能是用户是否下载了文件。了解该参数是否构成安全风险取决于您的判断。