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

Treat Enketo subdomain as a trusted CSRF origin #3731

Merged
merged 1 commit into from Mar 17, 2022

Conversation

jnm
Copy link
Member

@jnm jnm commented Mar 17, 2022

The change in #3707 requires that Enketo be able satisfy KPI's CSRF protection. This PR sets a CSRF origin that matches the session cookie domain (e.g. .kobotoolbox.org for kf.kobotoolbox.org and ee.kobotoolbox.org), so that Django does not reject Enketo's requests with messages like:
CSRF Failed: Referer checking failed - [https://ee.kobotoolbox.org/edit/ckPYrJVx?instance_id=bec48ff4-5a9e-42a0-98d0-49351a601508&return_url=false]() does not match any trusted origins.

See also #2658.

@noliveleger noliveleger merged commit 9be44a8 into 2.022.08 Mar 17, 2022
@noliveleger noliveleger deleted the fix-csrf-trusted-origins branch March 17, 2022 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants