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

No content type constraint #14

Merged
merged 3 commits into from
Jan 28, 2023
Merged

No content type constraint #14

merged 3 commits into from
Jan 28, 2023

Conversation

sio4
Copy link
Member

@sio4 sio4 commented Jan 28, 2023

What is being done in this PR?

fixes #6

What are the main choices made to get to this solution?

For the Content-Type constraint, I couldn't imagine any reason for the current limitation, and I believe CSRF doesn't care about the content type. I found some histories of the code block at gobuffalo/buffalo#387, gobuffalo/buffalo#767, and gobuffalo/buffalo#768 but there is no detailed information. (see also #6 (comment))

For the response code, 403 is normal for CSRF protection so it could be nice than 500 Internal Server Error :-)

@sio4 sio4 added bug Something isn't working process process or management stuffs labels Jan 28, 2023
@sio4 sio4 added this to the v1.0.2 milestone Jan 28, 2023
@sio4 sio4 requested a review from a team January 28, 2023 15:43
@sio4 sio4 self-assigned this Jan 28, 2023
@paganotoni
Copy link
Member

This seems reasonable to me @sio4. Thanks for putting it together.

@paganotoni
Copy link
Member

I just saw your question in the issue and I do not remember being part of that choice. Maybe with some of the PR template we can get historical conversations and things for the future. That said, I think it would be good to tell some of the reasoning behind this change in the second question of this PR.

@sio4
Copy link
Member Author

sio4 commented Jan 28, 2023

I just saw your question in the issue and I do not remember being part of that choice. Maybe with some of the PR template we can get historical conversations and things for the future. That said, I think it would be good to tell some of the reasoning behind this change in the second question of this PR.

yeah, indeed, I submitted the PR before writing and erasing all required/unnecessary PR comments :-)

I think it could be fine since we cannot find a reason for the limitation, then I think it's OK :-) Let's see if it make another issue :-)

@sio4 sio4 merged commit 0f17953 into main Jan 28, 2023
@sio4 sio4 deleted the no-content-type-constraint branch January 28, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working process process or management stuffs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MW-CSRF ignores POST/PUT/DELETE with Content-Type: application/json
2 participants