简体   繁体   English

Symfony 5:CSRF 令牌无效

[英]Symfony 5: CSRF token is invalid

I know this has been asked many times before and I have been searching the web for the last hour but I can't find a solution.我知道这已经被问过很多次了,过去一个小时我一直在网上搜索,但我找不到解决方案。

What I'm trying to do is update my user data, in this case, my username.我想要做的是更新我的用户数据,在这种情况下,我的用户名。

I have profiler installed to check on errors and stuff like that, I haven't even submitted the form to change and I get an error that the token is invalid.我安装了探查器来检查错误和类似的东西,我什至没有提交要更改的表单,我收到一个错误,表明令牌无效。 I checked the source to see if it was even there and yes it was.我检查了来源,看看它是否在那里,是的。

图像
(source: suidgeest.eu ) (来源: suidgeest.eu

PS: Images are like this because I need 10 rep. PS:图像是这样的,因为我需要 10 个代表。

检查您的 php 会话文件夹是否具有正确的权限,这在我之前发生过,就是这样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM