Skip to content

Commit

Permalink
Fix compatibility with Ruby 3.1' Psych version
Browse files Browse the repository at this point in the history
The new Psych version required by Ruby 3.1 no longer allows the loading
of arbitrary classes into YAML by default. We switch to `#safe_load` and
enable the class we're currently using.

See:

ruby/psych@cb50aa8
ruby/psych@1764942

[skip ci]
  • Loading branch information
waiting-for-dev committed May 3, 2022
1 parent db88911 commit 008168c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/app/models/spree/log_entry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class LogEntry < Spree::Base
belongs_to :source, polymorphic: true, optional: true

def parsed_details
@details ||= YAML.load(details)
@details ||= YAML.safe_load(details, permitted_classes: [ActiveMerchant::Billing::Response])
end
end
end

0 comments on commit 008168c

Please sign in to comment.