paper-trail-gem--paper_trail/spec/paper_trail
Tim Connor 172ac1d747 Ensure YAML safe loading in Rails 6.1
As part of the fix for CVE-2022-32224 Rails intruduced safe YAML loading
and the `ActiveRecord.yaml_column_permitted_classes` config.

PaperTrail added support for respecting the new configuration here
https://github.com/paper-trail-gem/paper_trail/pull/1397

The CVE-2022-32224 fix was also backported to Rails versions 5.2.8.1,
6.0.5.1, and, 6.1.6.1, however the name of the confiuration is slightly
different from that in Rails 7.x.

    7.0.3.1 ActiveRecord.yaml_column_permitted_classes
    6.1.6.1 ActiveRecord::Base.yaml_column_permitted_classes
    6.0.5.1 ActiveRecord::Base.yaml_column_permitted_classes
    5.2.8.1 ActiveRecord::Base.yaml_column_permitted_classes

PaperTrail currently doesn't support this alternative configuration
naming, which means it will silent fall back to unsafe YAML loading.

This commit updates `PaperTrail::Serializers::YAML` to be compatible
with safe YAML loading for the Rails 5.2 / 6.0 / 6.1 branches.
2022-10-16 01:41:53 -04:00
..
attribute_serializers Remove vestigial version conditionals 2021-03-21 01:07:08 -04:00
events Use unsafe_load instead of load 2021-12-29 10:56:06 +01:00
serializers Ensure YAML safe loading in Rails 6.1 2022-10-16 01:41:53 -04:00
type_serializers Rails 7.0 Compatibility (#1365) 2022-01-21 00:10:53 -05:00
cleaner_spec.rb RSpec/ContextWording 2021-08-29 22:22:39 -04:00
compatibility_spec.rb Rails 7.0 Compatibility (#1365) 2022-01-21 00:10:53 -05:00
config_spec.rb Removes item_subtype requirement for model-specific limits. 2021-07-26 09:05:24 -06:00
model_config_spec.rb Alphabetize methods, other code style 2018-11-12 13:05:15 -05:00
request_spec.rb RSpec/ContextWording 2021-08-29 22:22:39 -04:00
serializer_spec.rb RSpec/FilePath 2021-08-29 23:04:05 -04:00
version_limit_spec.rb Removes item_subtype requirement for model-specific limits. 2021-07-26 09:05:24 -06:00
version_number_spec.rb Lint: Style/FrozenStringLiteralComment 2017-12-10 23:05:39 -05:00
version_spec.rb RSpec/ContextWording 2021-08-29 22:22:39 -04:00