From 7752e9a19abf14c44f28ac3eca28e496dbcca4f9 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Thu, 21 Jul 2022 00:41:29 +0000 Subject: Psych::DisallowedClass exception when loading default plugin settings (#37450, #37476). Contributed by Dmitry Makurin. git-svn-id: https://svn.redmine.org/redmine/trunk@21725 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/setting.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/models/setting.rb b/app/models/setting.rb index 53b88bcad..aa27d9ecf 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: [ActiveSupport::HashWithIndifferentAccess]) + v = YAML.safe_load(v, permitted_classes: [Symbol, ActiveSupport::HashWithIndifferentAccess]) v = force_utf8_strings(v) end v = v.to_sym if available_settings[name]['format'] == 'symbol' && !v.blank? -- cgit v1.2.3