activity_notification 2.2.3 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30c5b3d148d4606e3ebd7c26a14a746180f2ccde5c6197bf28c95aaeceba8d48
4
- data.tar.gz: 63454217d875157c64d22dd0e15e947912a73d7f6a1bba371cba05a0973ba680
3
+ metadata.gz: 86e614046f4d79bd83248b78e66855f7fe8269985676b2afd95389b29e56e25f
4
+ data.tar.gz: 7a0e82b085c744a2f3197bd530b69b4ed708d93dcaa6f74ad9854afbf5ecc6a2
5
5
  SHA512:
6
- metadata.gz: 2c7c724cdf1acb560ed8d02c56f80bc5cddee91fc0537779480efae64a40108f14fdcd55850ca121bf766416dad818dc664bdad196c17ef6ebe38d31c18ed2f2
7
- data.tar.gz: 604d78217049389797f3508f621b54e0efd0962c075cf8c500d2b957c52e677584f1ec1eeea326bb12570cbe953c02581b248b9dfff54a80328bbf509b9871ee
6
+ metadata.gz: c0dbbb13396e89d5bbfc8f0fc034fb4c1ad1f02e8ceb8ed1e9b6b8beb8c66e55e72c2e23fcd4383564321992f7fd3fe7f7b6dc3c85ddb338ff7cf43639306f15
7
+ data.tar.gz: d972a277eabf7256deff36129a8253a423603333deebd96686d7305a9febcb7b19e85f7ea78b48655326899b06aa1535dc85f01bfb6b340df52a56db583f0336
@@ -30,27 +30,27 @@ jobs:
30
30
  include:
31
31
  # https://www.ruby-lang.org/en/downloads
32
32
  - gemfile: gemfiles/Gemfile.rails-5.0
33
- ruby-version: 2.7.5
33
+ ruby-version: 2.7.7
34
34
  - gemfile: gemfiles/Gemfile.rails-5.1
35
- ruby-version: 2.7.5
35
+ ruby-version: 2.7.7
36
36
  - gemfile: gemfiles/Gemfile.rails-5.2
37
- ruby-version: 2.7.5
37
+ ruby-version: 2.7.7
38
38
  - gemfile: gemfiles/Gemfile.rails-6.0
39
- ruby-version: 3.0.3
39
+ ruby-version: 3.2.1
40
40
  - gemfile: gemfiles/Gemfile.rails-6.1
41
- ruby-version: 3.0.3
41
+ ruby-version: 3.2.1
42
42
  - gemfile: gemfiles/Gemfile.rails-7.0
43
- ruby-version: 3.0.3
43
+ ruby-version: 3.2.1
44
44
  - gemfile: Gemfile
45
- ruby-version: 3.0.3
45
+ ruby-version: 3.2.1
46
46
  orm: active_record
47
47
  test-db: mysql
48
48
  - gemfile: Gemfile
49
- ruby-version: 3.0.3
49
+ ruby-version: 3.2.1
50
50
  orm: active_record
51
51
  test-db: postgresql
52
52
  - gemfile: Gemfile
53
- ruby-version: 3.0.3
53
+ ruby-version: 3.2.1
54
54
  orm: mongoid
55
55
  test-db: mongodb
56
56
  - gemfile: Gemfile
@@ -97,7 +97,7 @@ jobs:
97
97
  - 27017:27017
98
98
  env:
99
99
  MONGO_INITDB_DATABASE: activity_notification_test
100
- options: --health-cmd mongo --health-interval 10s --health-timeout 5s --health-retries 5
100
+ options: --health-cmd mongosh --health-interval 10s --health-timeout 5s --health-retries 5
101
101
 
102
102
  steps:
103
103
  - uses: actions/checkout@v2
@@ -106,10 +106,6 @@ jobs:
106
106
  with:
107
107
  ruby-version: ${{ matrix.ruby-version }}
108
108
  bundler-cache: true
109
- - name: Install dependencies
110
- run: |
111
- bundle install
112
- bundle update
113
109
  - name: Setup Amazon DynamoDB Local
114
110
  if: matrix.orm == 'dynamoid'
115
111
  run: |
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 2.2.4 / 2023-03-20
2
+ [Full Changelog](http://github.com/simukappu/activity_notification/compare/v2.2.3...v2.2.4)
3
+
4
+ Bug Fixes:
5
+
6
+ * Fix broken serialization with Rails security patch - [#166](https://github.com/simukappu/activity_notification/issues/166) [#167](https://github.com/simukappu/activity_notification/pull/167)
7
+
1
8
  ## 2.2.3 / 2022-02-12
2
9
  [Full Changelog](http://github.com/simukappu/activity_notification/compare/v2.2.2...v2.2.3)
3
10
 
data/Gemfile CHANGED
@@ -2,13 +2,16 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '~> 6.0.0'
5
+ gem 'rails', '~> 7.0.0'
6
6
 
7
7
  group :production do
8
+ gem 'sprockets-rails'
8
9
  gem 'puma'
9
10
  gem 'pg'
10
11
  gem 'devise'
11
- gem 'devise_token_auth'
12
+ # gem 'devise_token_auth'
13
+ # https://github.com/lynndylanhurley/devise_token_auth/pull/1517
14
+ gem 'devise_token_auth', git: 'https://github.com/lynndylanhurley/devise_token_auth.git'
12
15
  end
13
16
 
14
17
  group :development do
@@ -20,7 +23,7 @@ group :test do
20
23
  gem 'ammeter'
21
24
  gem 'timecop'
22
25
  gem 'committee'
23
- gem 'committee-rails'
26
+ gem 'committee-rails', '< 0.6'
24
27
  # gem 'coveralls', require: false
25
28
  gem 'coveralls_reborn', require: false
26
29
  end
data/docs/Setup.md CHANGED
@@ -46,6 +46,22 @@ The same can be done for the subscription table name, e.g., if you're using the
46
46
  config.subscription_table_name = "notifications_subscriptions"
47
47
  ```
48
48
 
49
+ If you're redefining `yaml_column_permitted_classes` in *config/application.rb*, then you need to add a few classes to the whitelist to make sure *activity_notification* still works as expected.
50
+
51
+ ```ruby
52
+ config.active_record.yaml_column_permitted_classes ||= []
53
+
54
+ # your override(s), e.g: MyWhitelistedClass
55
+ config.active_record.yaml_column_permitted_classes << MyWhitelistedClass
56
+
57
+ # overrides required for activity_notification to work
58
+ config.yaml_column_permitted_classes << ActiveSupport::HashWithIndifferentAccess
59
+ config.yaml_column_permitted_classes << ActiveSupport::TimeWithZone
60
+ config.yaml_column_permitted_classes << ActiveSupport::TimeZone
61
+ config.yaml_column_permitted_classes << Symbol
62
+ config.yaml_column_permitted_classes << Time
63
+ ```
64
+
49
65
  #### Using Mongoid ORM
50
66
 
51
67
  When you use *activity_notification* with [Mongoid](http://mongoid.org) ORM, set **AN_ORM** environment variable to **mongoid**:
@@ -17,7 +17,7 @@ group :test do
17
17
  gem 'ammeter'
18
18
  gem 'timecop'
19
19
  gem 'committee'
20
- gem 'committee-rails'
20
+ gem 'committee-rails', '< 0.6'
21
21
  # gem 'coveralls', require: false
22
22
  gem 'coveralls_reborn', require: false
23
23
  end
@@ -16,7 +16,7 @@ group :test do
16
16
  gem 'ammeter'
17
17
  gem 'timecop'
18
18
  gem 'committee'
19
- gem 'committee-rails'
19
+ gem 'committee-rails', '< 0.6'
20
20
  # gem 'coveralls', require: false
21
21
  gem 'coveralls_reborn', require: false
22
22
  end
@@ -16,7 +16,7 @@ group :test do
16
16
  gem 'ammeter'
17
17
  gem 'timecop'
18
18
  gem 'committee'
19
- gem 'committee-rails'
19
+ gem 'committee-rails', '< 0.6'
20
20
  # gem 'coveralls', require: false
21
21
  gem 'coveralls_reborn', require: false
22
22
  end
@@ -3,6 +3,7 @@ source 'https://rubygems.org'
3
3
  gemspec path: '../'
4
4
 
5
5
  gem 'rails', '~> 6.0.0'
6
+ gem 'psych', '< 4'
6
7
 
7
8
  group :development do
8
9
  gem 'bullet'
@@ -14,7 +15,7 @@ group :test do
14
15
  gem 'ammeter'
15
16
  gem 'timecop'
16
17
  gem 'committee'
17
- gem 'committee-rails'
18
+ gem 'committee-rails', '< 0.6'
18
19
  # gem 'coveralls', require: false
19
20
  gem 'coveralls_reborn', require: false
20
21
  end
@@ -14,7 +14,7 @@ group :test do
14
14
  gem 'ammeter'
15
15
  gem 'timecop'
16
16
  gem 'committee'
17
- gem 'committee-rails'
17
+ gem 'committee-rails', '< 0.6'
18
18
  # gem 'coveralls', require: false
19
19
  gem 'coveralls_reborn', require: false
20
20
  end
@@ -3,12 +3,9 @@ source 'https://rubygems.org'
3
3
  gemspec path: '../'
4
4
 
5
5
  gem 'rails', '~> 7.0.0'
6
+ gem 'sprockets-rails'
6
7
  # https://github.com/lynndylanhurley/devise_token_auth/pull/1517
7
8
  gem 'devise_token_auth', git: 'https://github.com/lynndylanhurley/devise_token_auth.git'
8
- # https://jira.mongodb.org/browse/MONGOID-5193
9
- gem 'mongoid', git: 'https://github.com/mongodb/mongoid.git'
10
-
11
- gem 'sprockets-rails'
12
9
 
13
10
  group :development do
14
11
  gem 'bullet'
@@ -20,7 +17,7 @@ group :test do
20
17
  gem 'ammeter'
21
18
  gem 'timecop'
22
19
  gem 'committee'
23
- gem 'committee-rails'
20
+ gem 'committee-rails', '< 0.6'
24
21
  # gem 'coveralls', require: false
25
22
  gem 'coveralls_reborn', require: false
26
23
  end
@@ -17,4 +17,26 @@ module ActivityNotification
17
17
  end
18
18
  end
19
19
 
20
- ActiveRecord::Base.class_eval { include ActivityNotification::Models } if defined?(ActiveRecord::Base)
20
+ if defined?(ActiveRecord::Base)
21
+ ActiveRecord::Base.class_eval { include ActivityNotification::Models }
22
+
23
+ # https://github.com/simukappu/activity_notification/issues/166
24
+ # https://discuss.rubyonrails.org/t/cve-2022-32224-possible-rce-escalation-bug-with-serialized-columns-in-active-record/81017
25
+ if (Gem::Version.new("5.2.8.1") <= Rails.gem_version && Rails.gem_version < Gem::Version.new("6.0")) ||
26
+ (Gem::Version.new("6.0.5.1") <= Rails.gem_version && Rails.gem_version < Gem::Version.new("6.1")) ||
27
+ (Gem::Version.new("6.1.6.1") <= Rails.gem_version && Rails.gem_version < Gem::Version.new("7.0"))
28
+ ActiveRecord::Base.yaml_column_permitted_classes ||= []
29
+ ActiveRecord::Base.yaml_column_permitted_classes << ActiveSupport::HashWithIndifferentAccess
30
+ ActiveRecord::Base.yaml_column_permitted_classes << ActiveSupport::TimeWithZone
31
+ ActiveRecord::Base.yaml_column_permitted_classes << ActiveSupport::TimeZone
32
+ ActiveRecord::Base.yaml_column_permitted_classes << Symbol
33
+ ActiveRecord::Base.yaml_column_permitted_classes << Time
34
+ elsif Gem::Version.new("7.0.3.1") <= Rails.gem_version
35
+ ActiveRecord.yaml_column_permitted_classes ||= []
36
+ ActiveRecord.yaml_column_permitted_classes << ActiveSupport::HashWithIndifferentAccess
37
+ ActiveRecord.yaml_column_permitted_classes << ActiveSupport::TimeWithZone
38
+ ActiveRecord.yaml_column_permitted_classes << ActiveSupport::TimeZone
39
+ ActiveRecord.yaml_column_permitted_classes << Symbol
40
+ ActiveRecord.yaml_column_permitted_classes << Time
41
+ end
42
+ end
@@ -1,3 +1,3 @@
1
1
  module ActivityNotification
2
- VERSION = "2.2.3"
2
+ VERSION = "2.2.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activity_notification
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shota Yamazaki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-12 00:00:00.000000000 Z
11
+ date: 2023-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -683,7 +683,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
683
683
  - !ruby/object:Gem::Version
684
684
  version: '0'
685
685
  requirements: []
686
- rubygems_version: 3.2.32
686
+ rubygems_version: 3.2.33
687
687
  signing_key:
688
688
  specification_version: 4
689
689
  summary: Integrated user activity notifications for Ruby on Rails