[英]yii Csrf Token cookies, Why Transfer to Post?
Bad English: 烂英文:
Maybe I misunderstood how the Csrf, but why should it pass in the POST request, if it is in a cookie and can be taken from there. 也许我误解了Csrf是怎么回事,但是为什么它应该在POST请求中传递,如果它在cookie中并且可以从那里获取。
If it is not safe, why not? 如果不安全,为什么不呢? Why then it it the cookie is transmitted? 为什么然后它传输cookie?
Yii将创建一个带有CSRF令牌的cookie,每当提交表单时,它都会将cookie中的CSRF令牌与from中的CSRF令牌进行比较。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.