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

Default forgery protection strategy #39608

Conversation

EduardoGHdez
Copy link
Contributor

Summary

This set :exception as default forgery protection strategy, what is a
more secure default.

It would prevent users from setting a less secure strategy if they do not specify it.

Other Information

Some related PR's would be:

This set :exception as default forgery protection strategy, what is a
more secure default.

It would prevent users to set the wrong strategy if they do not specify
it.
@rails-bot rails-bot bot added the actionpack label Jun 12, 2020
@eugeneius
Copy link
Member

The idea of doing this came up recently in #39488 (comment).

Just changing the default isn't acceptable though, since it would break any application that calls the method without specifying a strategy. We should add a deprecation warning in that case to inform the user that the default will be changing in the next version.

more secure default

I'm not sure I agree that it's more secure; :null_session already prevents CSRF vulnerabilities. Could you explain this a bit more?

@rails-bot
Copy link

rails-bot bot commented Sep 10, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.

@rails-bot rails-bot bot added the stale label Sep 10, 2020
@rails-bot rails-bot bot closed this Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants