1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/lib
Rafael Mendonça França fd88ccc905
Raise exception when calling to_h in a unfiltered Parameters
Before we returned either an empty hash or only the always permitted
parameters (:controller and :action by default).

The previous behavior was dangerous because in order to get the
attributes users usually fallback to use to_unsafe_h that could
potentially introduce security issues.

The to_unsafe_h API is also not good since Parameters is a object that
quacks like a Hash but not in all cases since to_h would return an empty
hash and users were forced to check if to_unsafe_h is defined or if the
instance is a ActionController::Parameters in order to work with it.
This end up coupling a lot of libraries and parts of the application
with something that is from the controller layer.
2017-04-18 17:33:23 -04:00
..
abstract_controller Unfreeze interpolated string because it's useless. 2017-02-19 23:32:36 +08:00
action_controller Raise exception when calling to_h in a unfiltered Parameters 2017-04-18 17:33:23 -04:00
action_dispatch Use more specific check for :format in route path 2017-04-18 11:02:05 +01:00
action_pack Start Rails 5.2 development 2017-03-22 10:11:39 +10:30
abstract_controller.rb applies new string literal convention in actionpack/lib 2016-08-06 18:51:43 +02:00
action_controller.rb Include the content of the flash in the auto-generated etag (#26250) 2016-08-22 13:34:35 -07:00
action_dispatch.rb Move and rename system tests 2017-02-20 15:07:35 -05:00
action_pack.rb Bump license years for 2017 2016-12-31 08:34:08 -05:00