Revert "Switch settings to safe yaml load (#19928)" (#19982)

This commit is contained in:
Mac Siri 2023-08-23 10:32:26 -04:00 committed by GitHub
parent 7d1fabe3df
commit 2c80aedc1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -153,17 +153,7 @@ module Settings
# get the setting's value, YAML decoded
def value
return if self[:value].blank?
YAML.safe_load(self[:value],
permitted_classes: [
ActiveSupport::HashWithIndifferentAccess,
ActiveSupport::TimeZone,
ActiveSupport::TimeWithZone,
BigDecimal,
Symbol,
Time,
])
YAML.unsafe_load(self[:value]) if self[:value].present?
end
# set the settings's value, YAML encoded