Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rails 7.0.3.1: Psych::DisallowedClass: Tried to load unspecified class: Symbol #137

Open
sobakasu opened this issue Jul 14, 2022 · 1 comment

Comments

@sobakasu
Copy link

sobakasu commented Jul 14, 2022

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

@timfjord
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants