From: Go MAEDA Date: Thu, 25 Aug 2022 13:53:11 +0000 (+0000) Subject: Merged r21777 from trunk to 5.0-stable (#37476). X-Git-Tag: 5.0.3~25 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=db58c137a1cf880df72f141c9400c921c0cec4bf;p=redmine.git Merged r21777 from trunk to 5.0-stable (#37476). git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@21778 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/setting.rb b/app/models/setting.rb index aa27d9ecf..e2ff236be 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -108,7 +108,7 @@ class Setting < ActiveRecord::Base v = read_attribute(:value) # Unserialize serialized settings if available_settings[name]['serialized'] && v.is_a?(String) - v = YAML.safe_load(v, permitted_classes: [Symbol, ActiveSupport::HashWithIndifferentAccess]) + v = YAML.safe_load(v, permitted_classes: Rails.configuration.active_record.yaml_column_permitted_classes) v = force_utf8_strings(v) end v = v.to_sym if available_settings[name]['format'] == 'symbol' && !v.blank?