Fix YAML loading on Ruby 3.1
This commit is contained in:
parent
67bb8ea535
commit
acf81e56d0
1 changed files with 9 additions and 0 deletions
9
config/initializers/0_fix_psych.rb
Normal file
9
config/initializers/0_fix_psych.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Ruby 3.1 includes a breaking update to Psych 4.
|
||||
# Undo the breakage, as Mastodon doesn't load untrusted YAML files.
|
||||
# https://stackoverflow.com/a/71192990
|
||||
|
||||
module YAML
|
||||
class << self
|
||||
alias_method :load, :unsafe_load if YAML.respond_to? :unsafe_load
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue