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

Fix: take csrf token from admin form or cms toolbar instead of cookie #7570

Merged
merged 1 commit into from
Jun 1, 2023

Conversation

fsbraun
Copy link
Sponsor Member

@fsbraun fsbraun commented May 30, 2023

Description

This PR fixes #7568 which causes JS to fail if CSRF_COOKIE_HTTPONLY is set to True.

The codebase now does not contain any JavaScript access to cookies any more, which would be blocked by CSRF_COOKIE_HTTPONLY = True.

Related resources

Checklist

  • I have opened this pull request against develop-4
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on Slack to find a “pr review buddy” who is going to review my pull request.

@fsbraun fsbraun requested a review from a team May 30, 2023 17:04
@fsbraun fsbraun added the 4.1 label May 31, 2023
Copy link
Contributor

@adam-murray adam-murray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best code I've seen in at least 15 minutes!

@fsbraun fsbraun merged commit bd13e0e into django-cms:develop-4 Jun 1, 2023
88 checks passed
@fsbraun fsbraun deleted the fix/csrf_token branch June 1, 2023 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants