Skip to content
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

CSRF token not set when language switcher is rendered #11528

Closed
jacobtylerwalls opened this issue Oct 7, 2024 · 0 comments · Fixed by #11529
Closed

CSRF token not set when language switcher is rendered #11528

jacobtylerwalls opened this issue Oct 7, 2024 · 0 comments · Fixed by #11529
Assignees
Labels
Type: Bug Something isn't working

Comments

@jacobtylerwalls
Copy link
Member

The language switcher component makes POST requests and thus expects there to be a CSRF token. We aren't setting this token with pages containing the language switcher, so interactions with the language switcher before unrelated actions (e.g. login) that do set the cookie will fail.

Reported at https://community.archesproject.org/t/csrf-error-on-language-change/2568 by @ads04r.

@jacobtylerwalls jacobtylerwalls added the Type: Bug Something isn't working label Oct 7, 2024
@jacobtylerwalls jacobtylerwalls self-assigned this Oct 7, 2024
@chiatt chiatt added this to pipeline Oct 7, 2024
@jacobtylerwalls jacobtylerwalls moved this to 🏗 In Progress in pipeline Oct 7, 2024
@jacobtylerwalls jacobtylerwalls moved this from 🏗 In Progress to 👀 In Review in pipeline Oct 7, 2024
chiatt pushed a commit that referenced this issue Oct 21, 2024
…#11529)

* Fix language switcher CSRF error when interacting before login #11528
@chiatt chiatt closed this as completed Oct 21, 2024
@github-project-automation github-project-automation bot moved this from 👀 In Review to ✅ Done in pipeline Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants