json 2.19.3-java → 2.19.5-java

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: 5fec8bc8502145d86122eb567bc0c407361b9bb5296c4f3caf5907f0dca33196
4
- data.tar.gz: 8cb5aeb3fa683e59a4848d9d099a0c1d7ac70f499598ee5bbd115c535239ba0b
3
+ metadata.gz: a5c0875e24e3fbcc06aa748f53ed8132ad48fcf60b093ac6ffd93dfa606539e2
4
+ data.tar.gz: 202ae17bdb2e833f54eea52e6036e8fd48049b24abaeace4abcc7e43bf8823bd
5
5
  SHA512:
6
- metadata.gz: 4d2b97f5e9f2bc897806c2e25139fd4b67729aa2700998d647a4957bab134f0f8c7dea0284c730db9880fa68a33cb005590df9d4005bd6c578de589bcbca3dd2
7
- data.tar.gz: 7867073f237c23efa15e7c3b0d969eba53589a2b9a7d001975e05792c4d4637ee8d706b551864ede269802f8fb29d64364390959a9872fa9f1273bd82b6fa741
6
+ metadata.gz: 3b02f028f351f4eb2c1374471e54342e297b3ddfa2fab34c64981cb396f70980cf54b99ab5eb21e7d3a8a3a324c5939742e1c8f53c81f97cd6ad3c635bf39ad5
7
+ data.tar.gz: 0ced6dc79b84789a7cf307512f0b580f9d885141eccc79934802f0cfc112f666d979dc093663b17f552b53ff5b6f93f6541d1de1306ad754a8ebd04ac6ac5547
data/CHANGES.md CHANGED
@@ -2,13 +2,21 @@
2
2
 
3
3
  ### Unreleased
4
4
 
5
+ ### 2026-05-04 (2.19.5)
6
+
7
+ * Cap the parser to emit a maximum of 5 deprecation warnings per document. Emitting more is not helpful.
8
+
9
+ ### 2026-04-19 (2.19.4)
10
+
11
+ * Fix parsing of out of range floats (very large exponents that lead to either `0.0` or `Inf`).
12
+
5
13
  ### 2026-03-25 (2.19.3)
6
14
 
7
15
  * Fix handling of unescaped control characters preceeded by a backslash.
8
16
 
9
17
  ### 2026-03-18 (2.19.2)
10
18
 
11
- * Fix a format string injection vulnerability in `JSON.parse(doc, allow_duplicate_key: false)`.
19
+ * Fix a format string injection vulnerability in `JSON.parse(doc, allow_duplicate_key: false)`. `CVE-2026-33210`.
12
20
 
13
21
  ### 2026-03-08 (2.19.1)
14
22
 
@@ -28,6 +36,10 @@
28
36
 
29
37
  * Add `:allow_control_characters` parser options, to allow JSON strings containing unescaped ASCII control characters (e.g. newlines).
30
38
 
39
+ ### 2026-03-18 (2.17.1.2) - Security Backport
40
+
41
+ * Fix a format string injection vulnerability in `JSON.parse(doc, allow_duplicate_key: false)`. `CVE-2026-33210`.
42
+
31
43
  ### 2025-12-04 (2.17.1)
32
44
 
33
45
  * Fix a regression in parsing of unicode surogate pairs (`\uXX\uXX`) that could cause an invalid string to be returned.
@@ -54,6 +66,10 @@
54
66
  * Optimized numbers parsing using SWAR (thanks to Scott Myron).
55
67
  * Optimized parsing of pretty printed documents using SWAR (thanks to Scott Myron).
56
68
 
69
+ ### 2026-03-18 (2.15.2.1) - Security Backport
70
+
71
+ * Fix a format string injection vulnerability in `JSON.parse(doc, allow_duplicate_key: false)`. `CVE-2026-33210`.
72
+
57
73
  ### 2025-10-25 (2.15.2)
58
74
 
59
75
  * Fix `JSON::Coder` to have one dedicated depth counter per invocation.
Binary file
Binary file
@@ -48,7 +48,7 @@ module JSON
48
48
  SCRIPT_SAFE_ESCAPE_PATTERN = /[\/"\\\x0-\x1f\u2028-\u2029]/
49
49
 
50
50
  def self.native_type?(value) # :nodoc:
51
- (false == value || true == value || nil == value || String === value || Array === value || Hash === value || Integer === value || Float === value || Fragment === value)
51
+ (false == value || true == value || nil == value || String === value || Symbol === value || Array === value || Hash === value || Integer === value || Float === value || Fragment === value)
52
52
  end
53
53
 
54
54
  def self.native_key?(key) # :nodoc:
@@ -517,11 +517,11 @@ module JSON
517
517
 
518
518
  if empty?
519
519
  state.depth -= 1
520
- return '{}'
520
+ return +'{}'
521
521
  end
522
522
 
523
523
  delim = ",#{state.object_nl}"
524
- result = +"{#{state.object_nl}"
524
+ result = "{#{state.object_nl}"
525
525
  first = true
526
526
  key_type = nil
527
527
  indent = !state.object_nl.empty?
@@ -558,7 +558,7 @@ module JSON
558
558
  raise TypeError, "#{key.class}#to_s returns an instance of #{key_str.class}, expected a String"
559
559
  end
560
560
 
561
- result = +"#{result}#{key_json}#{state.space_before}:#{state.space}"
561
+ result = "#{result}#{key_json}#{state.space_before}:#{state.space}"
562
562
  if state.strict? && !Generator.native_type?(value)
563
563
  if state.as_json
564
564
  value = state.as_json.call(value, false)
@@ -609,7 +609,7 @@ module JSON
609
609
 
610
610
  if empty?
611
611
  state.depth -= 1
612
- return '[]'
612
+ return +'[]'
613
613
  end
614
614
 
615
615
  result = '['.dup
@@ -734,17 +734,17 @@ module JSON
734
734
 
735
735
  module TrueClass
736
736
  # Returns a JSON string for true: 'true'.
737
- def to_json(*) 'true' end
737
+ def to_json(*) +'true' end
738
738
  end
739
739
 
740
740
  module FalseClass
741
741
  # Returns a JSON string for false: 'false'.
742
- def to_json(*) 'false' end
742
+ def to_json(*) +'false' end
743
743
  end
744
744
 
745
745
  module NilClass
746
746
  # Returns a JSON string for nil: 'null'.
747
- def to_json(*) 'null' end
747
+ def to_json(*) +'null' end
748
748
  end
749
749
  end
750
750
  end
data/lib/json/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JSON
4
- VERSION = '2.19.3'
4
+ VERSION = '2.19.5'
5
5
  end
data/lib/json.rb CHANGED
@@ -335,8 +335,8 @@ require 'json/common'
335
335
  # JSON.generate(JSON::MinusInfinity)
336
336
  #
337
337
  # Allow:
338
- # ruby = [Float::NaN, Float::Infinity, Float::MinusInfinity]
339
- # JSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,-Infinity]'
338
+ # ruby = [Float::NAN, Float::INFINITY, JSON::NaN, JSON::Infinity, JSON::MinusInfinity]
339
+ # JSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,NaN,Infinity,-Infinity]'
340
340
  #
341
341
  # ---
342
342
  #
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.19.3
4
+ version: 2.19.5
5
5
  platform: java
6
6
  authors:
7
7
  - Daniel Luz
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-03-25 00:00:00.000000000 Z
10
+ date: 2026-05-04 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: A JSON implementation as a JRuby extension.
13
13
  email: dev+ruby@mernen.com