Skip to content

Commit

Permalink
Merge pull request solidusio#4451 from gsmendoza/gsmendoza/eng-395-up…
Browse files Browse the repository at this point in the history
…date-solidus-to-support-cve-2022-32224

Support CVE-2022-32224 Rails security updates
  • Loading branch information
kennyadsl authored Jul 14, 2022
2 parents df51df6 + 10da2e7 commit fee8a86
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions core/lib/spree/core/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ class Engine < ::Rails::Engine
generator.test_framework :rspec
end

if ActiveRecord.respond_to?(:yaml_column_permitted_classes) || ActiveRecord::Base.respond_to?(:yaml_column_permitted_classes)
config.active_record.yaml_column_permitted_classes ||= []
config.active_record.yaml_column_permitted_classes |=
[Symbol, BigDecimal, ActiveSupport::HashWithIndifferentAccess]
end

initializer "spree.environment", before: :load_config_initializers do |app|
app.config.spree = Spree::Config.environment
end
Expand Down
1 change: 1 addition & 0 deletions core/solidus_core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Gem::Specification.new do |s|
s.add_dependency 'mini_magick', '~> 4.10'
s.add_dependency 'monetize', '~> 1.8'
s.add_dependency 'kt-paperclip', ['>= 6.3', '< 8']
s.add_dependency 'psych', ['>= 3.1.0', '< 5.0']
s.add_dependency 'ransack', '~> 2.0'
s.add_dependency 'sprockets-rails'
s.add_dependency 'state_machines-activerecord', '~> 0.6'
Expand Down
2 changes: 1 addition & 1 deletion core/spec/models/spree/promotion/rules/user_role_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'rails_helper'

RSpec.describe Spree::Promotion::Rules::UserRole, type: :model do
let(:rule) { described_class.new(preferred_role_ids: roles_for_rule) }
let(:rule) { described_class.new(preferred_role_ids: roles_for_rule.map(&:id)) }
let(:user) { create(:user, spree_roles: roles_for_user) }
let(:roles_for_rule) { [] }
let(:roles_for_user) { [] }
Expand Down

0 comments on commit fee8a86

Please sign in to comment.