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

Any way to pass in allowed classes so the YAML.load deserialize things saved before the Active Record update? #112

Closed
gpinkham opened this issue Jul 13, 2022 · 3 comments

Comments

@gpinkham
Copy link

this CVE causes an update to Active Record and Psych and now our previously serialized values with a Time in them can't be deserialized. The fix is to tell YAML.load which classes are allowed but that's not available to us thru the settings gem. Curious if others are experiencing this today? Any work arounds?

@gpinkham
Copy link
Author

@ledermann
Copy link
Owner

ledermann commented Jul 14, 2022

I have added this to application.rb of my app and it works fine:

config.active_record.yaml_column_permitted_classes = [
  Symbol,
  Date,
  Time,
  # + some custom classes
]

@gpinkham
Copy link
Author

Thanks for the info!

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