From 8faa80d0ed33485706ae4bd0a311c1a219197e09 Mon Sep 17 00:00:00 2001 From: Ryan Orlando Date: Thu, 22 Feb 2024 11:09:09 -0500 Subject: [PATCH] Fix db migration issue --- config/environments/tdldev.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config/environments/tdldev.rb b/config/environments/tdldev.rb index a91a0e056..4cb94c931 100644 --- a/config/environments/tdldev.rb +++ b/config/environments/tdldev.rb @@ -7,9 +7,6 @@ # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false - # This resolves an issue loading symbols causing pysch disallowed class error - # Check out https://discuss.rubyonrails.org/t/cve-2022-32224-possible-rce-escalation-bug-with-serialized-columns-in-active-record/81017 - config.active_record.yaml_column_permitted_classes = [Symbol, Hash, HashWithIndifferentAccess] # Do not eager load code on boot. config.eager_load = false @@ -82,4 +79,10 @@ # Use an evented file watcher to asynchronously detect changes in source code, # routes, locales, etc. This feature depends on the listen gem. # config.file_watcher = ActiveSupport::EventedFileUpdateChecker + + # This resolves an issue loading symbols causing pysch disallowed class error + # Check out https://discuss.rubyonrails.org/t/cve-2022-32224-possible-rce-escalation-bug-with-serialized-columns-in-active-record/81017 + config.after_initialize do + config.active_record.yaml_column_permitted_classes = [Symbol, Hash, HashWithIndifferentAccess] + end end