kellerben / dudle

Online event coordination and survey application
https://dud-poll.inf.tu-dresden.de
GNU Affero General Public License v3.0
339 stars 67 forks source link

Tried to load unspecified class: Poll (Psych::DisallowedClass): #145

Open JoJoDeveloping opened 2 years ago

JoJoDeveloping commented 2 years ago

Updating ruby apparently breaks things. See more here: https://github.com/ruby/psych/issues/503

There are two possible solutions. One is to change YAML::load to YAML::unsafe_load. The better option is to add this to the ruby config:

config.active_record.yaml_column_permitted_classes = [Poll, /* maybe more */]

Unfortunately, I have no idea where the "Ruby config" would even be located for dudle. Hence I can't really offer a fix.

dl8dtl commented 1 year ago

I replaced all (three) occurences of YAML::load by YAML::unsafe_load and can confirm this is suitable as a workaround. Alas, I am completely illiterate in Ruby, so no idea about that config file as well.