-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Astro actions cookies broken, too large sometimes #11675
Comments
Thanks for reporting! We can probably find a smaller encoding to cut down on size. The |
Thanks Ben, I appreciate all your work. There's some potential solutions I thought of but I have no idea how feasible they would be to implement:
|
Was this fixed? I'm having problem with the cookie header when I use forms with more than 3 fields running locally where and I'm running Astro 14.5.4...... |
This should have been fixed in the latest, yes @gaytanmisael. If you're having an problem, feel free to open a new issue with a repro! |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When using astro form actions with more than two or three fields being validated, the large url-encoded cookie becomes too big to store in the browser and exceeds the 4096 character limit. It also contains an entire stacktrace. This means the Astro.getActionResult() does not return anything on the source/fallback page (the one in the Referrer header with the original form).
I also get strange 'deleted' cookies that break the entire project permenantly until the stackblitz is restarted.
And this associated stacktrace:
What's the expected result?
The client should be correctly redirected to the original page with the correct cookies/error messages. It should also work if both the confirmation page needs data and the originating page needs errors.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-g63nyt-zhjdjc?file=README.md
Participation
The text was updated successfully, but these errors were encountered: