activesupport 8.1.4 → 8.1.4.1

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: 273220875f318471f4762274c8b1f360159e9e89b008fd5b4b79ea0931e0974b
4
- data.tar.gz: e7a6e2364c58e00ef9993314e3182207b0c2b39a07d4e30470b3485438eb9dc6
3
+ metadata.gz: d814e12819b93177e9cd65bf4fd7b1422f4684dac923ba3c2cd3e600983ada02
4
+ data.tar.gz: 279ffdf8add2ff5b5238ee9a3792bd9f5f904c4c305b50948952115c77a1ebc0
5
5
  SHA512:
6
- metadata.gz: 3562450b3e30a8426934851940e2f344c781ba56a1048e70c80b90da735a4dec4e571aaeb892313ab5ab546ff52ce7e0423d3012d090ffd2e3713c9e4e8b08db
7
- data.tar.gz: 403060699c2a65347f2c9f5fb1238c898f04f7675e4102ad43bae2da4e64d55c17b33c9c15d1484a4e565fc34efd0d3150a5e4725ee26e1e567b46c0b55dabc9
6
+ metadata.gz: 35600d081d262c463d19a4e8baaf214d4e1602160e855b727b7cc593163ad2cac5d02a62f874ad4c47b7fb256c44d08069efac18400f9a7a64b648625742fedc
7
+ data.tar.gz: c475cd1858143209f9b7f4f5d14fb7a1d679d16bf3dcab32aa86ef98b9f11788f8256ffa89f4312de8f7db808405c09da88c2f4bb83f2913b2857a2ef56b64eb
data/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ ## Rails 8.1.4.1 (November 03, 2026) ##
2
+
3
+ * `ActiveSupport::MessagePack` no longer deserializes an unsafe
4
+ `ActiveSupport::SafeBuffer` as `html_safe`.
5
+
6
+ A `SafeBuffer` that was no longer `html_safe?`, for example after an
7
+ in-place `gsub!`, was deserialized as an `html_safe` `SafeBuffer`. It is now
8
+ serialized with an unsafe marker and deserialized as a `String`. Earlier
9
+ versions of Rails cannot read an unsafe buffer serialized this way.
10
+
11
+ [GHSA-2w9f-fxwj-w2qf]
12
+
13
+ *Jean Boussier*
14
+
15
+ * `ActiveSupport::Inflector#safe_constantize` matches the constant name in a
16
+ `LoadError` message as a literal string instead of building a `Regexp`
17
+ from it.
18
+
19
+ The name's segments were interpolated unescaped into the pattern, so input
20
+ that reaches `safe_constantize`, such as the channel identifier in an Action
21
+ Cable subscribe command, chose the source passed to the regexp compiler.
22
+
23
+ [GHSA-8474-xrp6-wh69]
24
+
25
+ *Jeremy Daer*
26
+
1
27
  ## Rails 8.1.4 (September 24, 2026) ##
2
28
 
3
29
  * Fix the debug error page rendering for `SyntaxError`s with multi-line messages.
@@ -10,7 +10,7 @@ module ActiveSupport
10
10
  MAJOR = 8
11
11
  MINOR = 1
12
12
  TINY = 4
13
- PRE = nil
13
+ PRE = "1"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -319,7 +319,8 @@ module ActiveSupport
319
319
  e.name.to_s == camel_cased_word.to_s)
320
320
  rescue LoadError => e
321
321
  message = e.respond_to?(:original_message) ? e.original_message : e.message
322
- raise unless /Unable to autoload constant #{const_regexp(camel_cased_word)}/.match?(message)
322
+ constant_name = camel_cased_word.split("::").find { |part| !part.empty? } || camel_cased_word
323
+ raise unless message.include?("Unable to autoload constant #{constant_name}")
323
324
  end
324
325
 
325
326
  # Returns the suffix that should be added to a number to denote the position
@@ -349,23 +350,6 @@ module ActiveSupport
349
350
  end
350
351
 
351
352
  private
352
- # Mounts a regular expression, returned as a string to ease interpolation,
353
- # that will match part by part the given constant.
354
- #
355
- # const_regexp("Foo::Bar::Baz") # => "Foo(::Bar(::Baz)?)?"
356
- # const_regexp("::") # => "::"
357
- def const_regexp(camel_cased_word)
358
- parts = camel_cased_word.split("::")
359
-
360
- return Regexp.escape(camel_cased_word) if parts.empty?
361
-
362
- last = parts.pop
363
-
364
- parts.reverse!.inject(last) do |acc, part|
365
- part.empty? ? acc : "#{part}(::#{acc})?"
366
- end
367
- end
368
-
369
353
  # Applies inflection rules for +singularize+ and +pluralize+.
370
354
  #
371
355
  # If passed an optional +locale+ parameter, the uncountables will be
@@ -249,11 +249,19 @@ module ActiveSupport
249
249
  end
250
250
 
251
251
  def write_safe_buffer(buffer, packer)
252
+ unless buffer.html_safe?
253
+ packer.write(false)
254
+ end
252
255
  packer.write(buffer.to_str)
253
256
  end
254
257
 
255
258
  def read_safe_buffer(unpacker)
256
- ActiveSupport::SafeBuffer.new(unpacker.read)
259
+ string_or_safe = unpacker.read
260
+ if string_or_safe
261
+ ActiveSupport::SafeBuffer.new(string_or_safe)
262
+ else
263
+ unpacker.read
264
+ end
257
265
  end
258
266
 
259
267
  def raise_unserializable(object, *)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activesupport
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.1.4
4
+ version: 8.1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
@@ -501,10 +501,10 @@ licenses:
501
501
  - MIT
502
502
  metadata:
503
503
  bug_tracker_uri: https://github.com/rails/rails/issues
504
- changelog_uri: https://github.com/rails/rails/blob/v8.1.4/activesupport/CHANGELOG.md
505
- documentation_uri: https://api.rubyonrails.org/v8.1.4/
504
+ changelog_uri: https://github.com/rails/rails/blob/v8.1.4.1/activesupport/CHANGELOG.md
505
+ documentation_uri: https://api.rubyonrails.org/v8.1.4.1/
506
506
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
507
- source_code_uri: https://github.com/rails/rails/tree/v8.1.4/activesupport
507
+ source_code_uri: https://github.com/rails/rails/tree/v8.1.4.1/activesupport
508
508
  rubygems_mfa_required: 'true'
509
509
  rdoc_options:
510
510
  - "--encoding"