Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

如标题描述:同源策略为了减少xssCSRF等攻击,但是通过这些是可以获得用户cookie的,还是造成了信息泄露,为什么不限制这些标签呢?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
3.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

不能完全限制,否则 CDN 和基于 Cookie 的负载均衡就没法做了,还有众多赖以生存的搜索引擎广告主也没法活了(谷歌自己就是全球最大的广告主,你说它能自己阉割自己吗)。

正因为如此,所以 Cookie 才引入 HTTP Only 来解决你说的问题啊。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...