Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Disable http_method_override by default #45278

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

Closed
Tobion opened this issue Feb 2, 2022 · 2 comments · Fixed by #45989
Closed

Disable http_method_override by default #45278

Tobion opened this issue Feb 2, 2022 · 2 comments · Fixed by #45989

Comments

@Tobion
Copy link
Contributor

Tobion commented Feb 2, 2022

Description

It bugs me that I have to disable http_method_override in every symfony project because it defaults to true: https://symfony.com/doc/current/reference/configuration/framework.html#http-method-override
The use-case of this feature is clear: To emulate e.g. PUT or DELETE requests using html forms. But I think the need for this is very uncommon and not modern. Furthermore enabling it opens security gateway if not used with CSRF protection.

So I'm proposing to switch the default value to false in the next major symfony version. For this, we need to deprecate relying on the default value. This should not affect many people as the default recipes already disable this config anyway, see https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/5.4/config/packages/framework.yaml#L5

@GromNaN
Copy link
Member

GromNaN commented Feb 2, 2022

Make sense after symfony/recipes#892

@fabpot
Copy link
Member

fabpot commented Feb 2, 2022

That makes sense to me and we should probably have done it earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants