activestorage 7.1.3.4 → 7.1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10c31beefd192ae50216812e96dd7326c6d301f84f3a9ac4c42cf41369bfbd68
4
- data.tar.gz: b744929e6b8cab0e2c2d2f834b453d538fad962a42b6b52f62ed74cf67fd000b
3
+ metadata.gz: 3e2fdc79c02f31ae87546d38d509d76e6745aa1613b53d3242036eaede2df98c
4
+ data.tar.gz: db43b46d975c7794b7dcc9948899b4c1cdd1f4d8002266e6bd9078fee560732f
5
5
  SHA512:
6
- metadata.gz: 93dcf40c82c8a7ecb7308c9e90c42a22816876cfe31c42304369a3979b4a6153a6296a8509d60a9e28bccdd0789f299ef3a734cb0b1b46ca1bd1cbd3c5f411ea
7
- data.tar.gz: 56d0c210295b80a5bd0fa4145901652ddb3d1baede6a22993a294ae4031a378e99c45775e73caefa8890cf6a5bdafb224c215fc12ca33c20491a0cdf1b201b17
6
+ metadata.gz: 93ff6753974b1f2ce12bb81c867c5ae0432de55dcb90db8e768c9911152651f48594c312f321c5e8e5971be826556f8338e20b80a07fd736a54884b0af2f790c
7
+ data.tar.gz: fa516053c9d81e0c6ac8003e5aeaee1be1e62c16e32c9ae0ec2fbcae41ebb255c3e49e780c5b1b58ca57049ee3ed421ecc08eb822d42ba58fb30e86d6c1ebdaf
data/CHANGELOG.md CHANGED
@@ -1,3 +1,38 @@
1
+ ## Rails 7.1.5.2 (August 13, 2025) ##
2
+
3
+ Remove dangerous transformations
4
+
5
+ [CVE-2025-24293]
6
+
7
+ *Zack Deveau*
8
+
9
+ ## Rails 7.1.5.1 (December 10, 2024) ##
10
+
11
+ * No changes.
12
+
13
+
14
+ ## Rails 7.1.5 (October 30, 2024) ##
15
+
16
+ * No changes.
17
+
18
+
19
+ ## Rails 7.1.4.2 (October 23, 2024) ##
20
+
21
+ * No changes.
22
+
23
+
24
+ ## Rails 7.1.4.1 (October 15, 2024) ##
25
+
26
+ * No changes.
27
+
28
+
29
+ ## Rails 7.1.4 (August 22, 2024) ##
30
+
31
+ * Fixes race condition for multiple preprocessed video variants.
32
+
33
+ *Justin Searls*
34
+
35
+
1
36
  ## Rails 7.1.3.4 (June 04, 2024) ##
2
37
 
3
38
  * No changes.
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ActiveStorage::PreviewImageJob < ActiveStorage::BaseJob
4
+ queue_as { ActiveStorage.queues[:preview_image] }
5
+
6
+ discard_on ActiveRecord::RecordNotFound, ActiveStorage::UnrepresentableError
7
+ retry_on ActiveStorage::IntegrityError, attempts: 10, wait: :polynomially_longer
8
+
9
+ def perform(blob, variations)
10
+ blob.preview({}).processed
11
+
12
+ variations.each do |transformations|
13
+ blob.preprocessed(transformations)
14
+ end
15
+ end
16
+ end
@@ -132,8 +132,18 @@ class ActiveStorage::Attachment < ActiveStorage::Record
132
132
  end
133
133
 
134
134
  def transform_variants_later
135
- named_variants.each do |_name, named_variant|
136
- blob.preprocessed(named_variant.transformations) if named_variant.preprocessed?(record)
135
+ preprocessed_variations = named_variants.filter_map { |_name, named_variant|
136
+ if named_variant.preprocessed?(record)
137
+ named_variant.transformations
138
+ end
139
+ }
140
+
141
+ if blob.preview_image_needed_before_processing_variants?
142
+ blob.create_preview_image_later(preprocessed_variations)
143
+ else
144
+ preprocessed_variations.each do |transformations|
145
+ blob.preprocessed(transformations)
146
+ end
137
147
  end
138
148
  end
139
149
 
@@ -98,6 +98,14 @@ module ActiveStorage::Blob::Representable
98
98
  variable? || previewable?
99
99
  end
100
100
 
101
+ def preview_image_needed_before_processing_variants? # :nodoc:
102
+ previewable? && !preview_image.attached?
103
+ end
104
+
105
+ def create_preview_image_later(variations) # :nodoc:
106
+ ActiveStorage::PreviewImageJob.perform_later(self, variations) if representable?
107
+ end
108
+
101
109
  def preprocessed(transformations) # :nodoc:
102
110
  ActiveStorage::TransformJob.perform_later(self, transformations) if representable?
103
111
  end
@@ -74,8 +74,10 @@ module ActiveStorage
74
74
  # The system has been designed to having you go through the ActiveStorage::Attached::One
75
75
  # proxy that provides the dynamic proxy to the associations and factory methods, like +attach+.
76
76
  #
77
- # If the +:dependent+ option isn't set, the attachment will be purged
78
- # (i.e. destroyed) whenever the record is destroyed.
77
+ # The +:dependent+ option defaults to +:purge_later+. This means the attachment will be
78
+ # purged (i.e. destroyed) in the background whenever the record is destroyed.
79
+ # If an ActiveJob::Backend queue adapter is not set in the application set it to
80
+ # +purge+ instead.
79
81
  #
80
82
  # If you need the attachment to use a service which differs from the globally configured one,
81
83
  # pass the +:service+ option. For instance:
@@ -162,8 +164,10 @@ module ActiveStorage
162
164
  # The system has been designed to having you go through the ActiveStorage::Attached::Many
163
165
  # proxy that provides the dynamic proxy to the associations and factory methods, like +#attach+.
164
166
  #
165
- # If the +:dependent+ option isn't set, all the attachments will be purged
166
- # (i.e. destroyed) whenever the record is destroyed.
167
+ # The +:dependent+ option defaults to +:purge_later+. This means the attachments will be
168
+ # purged (i.e. destroyed) in the background whenever the record is destroyed.
169
+ # If an ActiveJob::Backend queue adapter is not set in the application set it to
170
+ # +purge+ instead.
167
171
  #
168
172
  # If you need the attachment to use a service which differs from the globally configured one,
169
173
  # pass the +:service+ option. For instance:
@@ -9,8 +9,8 @@ module ActiveStorage
9
9
  module VERSION
10
10
  MAJOR = 7
11
11
  MINOR = 1
12
- TINY = 3
13
- PRE = "4"
12
+ TINY = 5
13
+ PRE = "2"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -35,7 +35,7 @@ require "active_storage/errors"
35
35
  require "marcel"
36
36
 
37
37
  # :markup: markdown
38
- # :include: activestorage/README.md
38
+ # :include: ../README.md
39
39
  module ActiveStorage
40
40
  extend ActiveSupport::Autoload
41
41
 
@@ -72,7 +72,6 @@ module ActiveStorage
72
72
  "annotate",
73
73
  "antialias",
74
74
  "append",
75
- "apply",
76
75
  "attenuate",
77
76
  "authenticate",
78
77
  "auto_gamma",
@@ -213,7 +212,6 @@ module ActiveStorage
213
212
  "linewidth",
214
213
  "liquid_rescale",
215
214
  "list",
216
- "loader",
217
215
  "log",
218
216
  "loop",
219
217
  "lowlight_color",
@@ -276,7 +274,6 @@ module ActiveStorage
276
274
  "rotate",
277
275
  "sample",
278
276
  "sampling_factor",
279
- "saver",
280
277
  "scale",
281
278
  "scene",
282
279
  "screen",
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activestorage
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.3.4
4
+ version: 7.1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-06-04 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activesupport
@@ -16,56 +15,56 @@ dependencies:
16
15
  requirements:
17
16
  - - '='
18
17
  - !ruby/object:Gem::Version
19
- version: 7.1.3.4
18
+ version: 7.1.5.2
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - '='
25
24
  - !ruby/object:Gem::Version
26
- version: 7.1.3.4
25
+ version: 7.1.5.2
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: actionpack
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - '='
32
31
  - !ruby/object:Gem::Version
33
- version: 7.1.3.4
32
+ version: 7.1.5.2
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - '='
39
38
  - !ruby/object:Gem::Version
40
- version: 7.1.3.4
39
+ version: 7.1.5.2
41
40
  - !ruby/object:Gem::Dependency
42
41
  name: activejob
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
44
  - - '='
46
45
  - !ruby/object:Gem::Version
47
- version: 7.1.3.4
46
+ version: 7.1.5.2
48
47
  type: :runtime
49
48
  prerelease: false
50
49
  version_requirements: !ruby/object:Gem::Requirement
51
50
  requirements:
52
51
  - - '='
53
52
  - !ruby/object:Gem::Version
54
- version: 7.1.3.4
53
+ version: 7.1.5.2
55
54
  - !ruby/object:Gem::Dependency
56
55
  name: activerecord
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
58
  - - '='
60
59
  - !ruby/object:Gem::Version
61
- version: 7.1.3.4
60
+ version: 7.1.5.2
62
61
  type: :runtime
63
62
  prerelease: false
64
63
  version_requirements: !ruby/object:Gem::Requirement
65
64
  requirements:
66
65
  - - '='
67
66
  - !ruby/object:Gem::Version
68
- version: 7.1.3.4
67
+ version: 7.1.5.2
69
68
  - !ruby/object:Gem::Dependency
70
69
  name: marcel
71
70
  requirement: !ruby/object:Gem::Requirement
@@ -116,6 +115,7 @@ files:
116
115
  - app/jobs/active_storage/analyze_job.rb
117
116
  - app/jobs/active_storage/base_job.rb
118
117
  - app/jobs/active_storage/mirror_job.rb
118
+ - app/jobs/active_storage/preview_image_job.rb
119
119
  - app/jobs/active_storage/purge_job.rb
120
120
  - app/jobs/active_storage/transform_job.rb
121
121
  - app/models/active_storage/attachment.rb
@@ -189,12 +189,11 @@ licenses:
189
189
  - MIT
190
190
  metadata:
191
191
  bug_tracker_uri: https://github.com/rails/rails/issues
192
- changelog_uri: https://github.com/rails/rails/blob/v7.1.3.4/activestorage/CHANGELOG.md
193
- documentation_uri: https://api.rubyonrails.org/v7.1.3.4/
192
+ changelog_uri: https://github.com/rails/rails/blob/v7.1.5.2/activestorage/CHANGELOG.md
193
+ documentation_uri: https://api.rubyonrails.org/v7.1.5.2/
194
194
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
195
- source_code_uri: https://github.com/rails/rails/tree/v7.1.3.4/activestorage
195
+ source_code_uri: https://github.com/rails/rails/tree/v7.1.5.2/activestorage
196
196
  rubygems_mfa_required: 'true'
197
- post_install_message:
198
197
  rdoc_options: []
199
198
  require_paths:
200
199
  - lib
@@ -209,8 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
208
  - !ruby/object:Gem::Version
210
209
  version: '0'
211
210
  requirements: []
212
- rubygems_version: 3.3.27
213
- signing_key:
211
+ rubygems_version: 3.6.9
214
212
  specification_version: 4
215
213
  summary: Local and cloud file storage framework.
216
214
  test_files: []