i18n-active_record
i18n-active_record copied to clipboard
rails 7.0.3.1: Psych::DisallowedClass: Tried to load unspecified class: Symbol
We get an error with rails 7.0.3.1. Downgrading to rails 7.0.3 fixes the error.
The error is:
Psych::DisallowedClass: Tried to load unspecified class: Symbol
steps to reproduce:
errors = ActiveModel::Errors.new(model)
errors.add(:attribute, :blank)
errors[:attribute]
another workaround:
config.active_record.yaml_column_permitted_classes = [Symbol, Date, Time]
seems to be caused by https://discuss.rubyonrails.org/t/cve-2022-32224-possible-rce-escalation-bug-with-serialized-columns-in-active-record/81017
Thanks for reporting the issue
I think the only thing we can do now is to wait once the issue will be fixed in Rails.
In the meantime, we should use the provided workaround