You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a follow-up ticket for #2505. The ticket was closed and then I noticed another problem, which could be reproduced there, but has not yet been solved. As the other ticket has been closed and the new problem has therefore presumably been lost, here is a new ticket.
Here is the problem again:
In my real app I have the case that I have a form for account settings. If I then change a setting and save it, it works. If I then change something again without reloading the page and want to save it, the CSRF error appears.
In another case, I have a form where you can change the password. When I fill in the fields and save them, I reset the form afterwards. If I then fill it out again and save it, the CSRF error also occurs.
It also happens if you submit the form and then the validation fails (for example, if the password requirements are not met) and you then correct the value and resubmit the form. Then I also get a CSRF error (request ends in 422 Unprocessable Content).
There is a simple form on the /home page that can be used to reproduce the problem. If you enter something in the field and then submit the form, this works. However, if you then enter something in the field again without reloading the page and submit the form again, the CSRF error occurs.
The logs then contain the following warning:
CSRF validation failed: double-submit info was used in a previous request but is now missing.
The text was updated successfully, but these errors were encountered:
This is a follow-up ticket for #2505. The ticket was closed and then I noticed another problem, which could be reproduced there, but has not yet been solved. As the other ticket has been closed and the new problem has therefore presumably been lost, here is a new ticket.
Here is the problem again:
In my real app I have the case that I have a form for account settings. If I then change a setting and save it, it works. If I then change something again without reloading the page and want to save it, the CSRF error appears.
In another case, I have a form where you can change the password. When I fill in the fields and save them, I reset the form afterwards. If I then fill it out again and save it, the CSRF error also occurs.
It also happens if you submit the form and then the validation fails (for example, if the password requirements are not met) and you then correct the value and resubmit the form. Then I also get a CSRF error (request ends in 422 Unprocessable Content).
It also happens in the latest Symfony version. I have updated my reproducer from the old ticket to the newest version: https://github.com/momocode-de/symfony-ux-issue-2505
There is a simple form on the /home page that can be used to reproduce the problem. If you enter something in the field and then submit the form, this works. However, if you then enter something in the field again without reloading the page and submit the form again, the CSRF error occurs.
The logs then contain the following warning:
The text was updated successfully, but these errors were encountered: