Change the name of the csrf token cookie #375
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change is pretty crucial for everyone that runs other django applications on subdomains on the same domain that is used as a kobotoolbox base.
Exemplary case:
kobo.example.com
- Kobotoolbox appother_app.example.com
- Other, not related to the above django appThe kobo's cookie is established on wildcard
*.example.com
domain, thus, it is also accessible on the other_app. Assuming that the other_app is also a django application, it will break the POST request since wrong csrf token might be used for request authorization. Please also see the comment in the code for the refrence.The patch is already tested on production machine, and appears to be working correctly. Please note that this change and according Kpi pull request should be submitted simultaneously, since submitting only one would break the app.
Related KPI change: kobotoolbox/kpi#1428