moon548834's recent timeline updates
moon548834

moon548834

V2EX member #649644, joined on 2023-09-21 15:03:57 +08:00
moon548834's recent replies
Jul 30, 2024
Replied to a topic by NoKey 程序员 token 如何存放才能避免 csrf 攻击
@NoKey 应该是吧,总之我还是认为把 token 放 header 里是最佳实践
Jul 26, 2024
Replied to a topic by NoKey 程序员 token 如何存放才能避免 csrf 攻击
"在你例子中,用户从钓鱼网站 B 触发的网站 C 的请求,携带了 Cookie 到目标服务器,但是服务器是不会认可`此次请求已被授权的`,因为不是从网站 C 页面上发起的"

这个你说的是同源检查吧,如果 C 不做同源检查,那应该是认可的..

ref: https://tech.meituan.com/2018/10/11/fe-security-csrf.html
Jul 24, 2024
Replied to a topic by NoKey 程序员 token 如何存放才能避免 csrf 攻击
@Belmode 请教下为什么 token 放 cookie 里可以呢?我理解 header 是 ok 的
用户 A 请求正常网站 C ,假设用户点了某个钓鱼网站 B ,那么 B->C 的过程不是会把 cookie 信息自动带上吗?

或者说一个普通的 access_token 放到 cookie 面临的问题不能被一个也在 cookie 中的 csrf token 解决?
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1679 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 16:29 · PVG 00:29 · LAX 09:29 · JFK 12:29
♥ Do have faith in what you're doing.