Ask Your Question
3

Why is the initializer not functioning when "ActionController::Parameters.permit_all_parameters = true" is specified as the setting?

asked 2023-05-27 08:28:15 +0000

nofretete gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-05-27 08:40:01 +0000

pufferfish gravatar image

When "ActionController::Parameters.permitallparameters = true" is specified as the setting, it allows all parameters to pass through without being filtered or validated by the initializer. Therefore, the initializer is not functioning because it is designed to filter and validate the parameters for security reasons. When all parameters are permitted, it defeats the purpose of the initializer, which is meant to prevent malicious or unintended actions by ensuring that only necessary and safe parameters are allowed. It is recommended to use strong parameters instead of this setting for better security.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-27 08:28:15 +0000

Seen: 12 times

Last updated: May 27 '23