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

Format button not working #492

Closed
avi-perl opened this issue Sep 22, 2022 · 4 comments
Closed

Format button not working #492

avi-perl opened this issue Sep 22, 2022 · 4 comments
Assignees
Labels
Contributions welcome Help on this would be much appreciated wontfix

Comments

@avi-perl
Copy link

Clicking the format button is not working.
When I click the text on the button, nothing happens at all. If I select another part of the button, I get the following:

Forbidden (403)
CSRF verification failed. Request aborted.

@lawson89
Copy link
Contributor

lawson89 commented Oct 8, 2022

Ok I just ran into this exact issue on a project of mine and finally figured it out. It was this setting which security had mandated

CSRF_COOKIE_HTTPONLY = True

Explanation from Django docs below

CSRF_COOKIE_HTTPONLY

Default: False

Whether to use HttpOnly flag on the CSRF cookie. If this is set to True, client-side JavaScript will not be able to access the CSRF cookie.

@marksweb
Copy link
Collaborator

marksweb commented Oct 9, 2022

@lawson89 Thank you for clarifying this.

I don't turn that setting on because of the problems it causes in javascript so I've not seen this.

Perhaps we need some additional docs to clarify this django setting in relation to this functionality.

@marksweb marksweb added wontfix Contributions welcome Help on this would be much appreciated labels Oct 9, 2022
@lawson89
Copy link
Contributor

lawson89 commented Oct 9, 2022

Ok sure I am happy to take a crack at adding this in the docs if you would like

@marksweb
Copy link
Collaborator

marksweb commented Oct 9, 2022

@lawson89 That would be great if you could please! 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contributions welcome Help on this would be much appreciated wontfix
Projects
None yet
Development

No branches or pull requests

3 participants