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

Categories

0 votes
3.5k views
in Technique[技术] by (71.8m points)

为什么imglinkscript标签不受同源策略限制

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...