json 2.15.1-java → 2.15.2.1-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: c9c9f896105222f17d7561710f916b6dd6ceb760e3d9ac17a778159954a3cd4d
4
- data.tar.gz: 551c43c7e7f71d3c849d4b6af1a3542665b21732e2f5114631163d789cde7c92
3
+ metadata.gz: 0f8cb2876d08c1388fc4d57e9ef0ef9fb4a05d80a0c12b1d955dc1a58d81f759
4
+ data.tar.gz: d9a7847da9e71d6e811e69cbd410cd612947f9861830d0fb0d35aaf4e9db083d
5
5
  SHA512:
6
- metadata.gz: eb15c44e7a4372de8f9aed4ec69f4070bffdd9311e32606b91d81b3326ff343e5d64d5346f3a604be0f83ce623ba13d45ea63ace209ba9bc47f758dcc7d8e05f
7
- data.tar.gz: a9c67ce3cdc6faf65fc8467d043bf9907d58933bdff9131b184ee29d735277a88d597846c04bcbe1ae3e2990aca62c8b19e6b90307c16bdd69b7b2b863166b29
6
+ metadata.gz: 8de7ac6ff6d6015cf62ffb8668bcc8bd95adfc8421f4917ba1cd417f630b8ce2f2d64ebeae3ad76ebe111fdcc23d6d844f96644f6a240f7b5e5a7973c23f4854
7
+ data.tar.gz: 732b12a5d1d2c4526fe7f1b3ddcb1ac1eeba0e2de4758a631524566c3940c5bba987abbf47c139ce22da82585d39b56a6fc72b95e61cbdff85d549210b776a63
data/CHANGES.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  ### Unreleased
4
4
 
5
+ ### 2026-03-18 (2.15.2.1)
6
+
7
+ * Fix a format string injection vulnerability in JSON.parse(doc, allow_duplicate_key: false).
8
+
9
+ ### 2025-10-25 (2.15.2)
10
+
11
+ * Fix `JSON::Coder` to have one dedicated depth counter per invocation.
12
+ After encountering a circular reference in `JSON::Coder#dump`, any further `#dump` call would raise `JSON::NestingError`.
13
+
5
14
  ### 2025-10-07 (2.15.1)
6
15
 
7
16
  * Fix incorrect escaping in the JRuby extension when encoding shared strings.
Binary file
Binary file
@@ -212,7 +212,7 @@ module JSON
212
212
  return if @max_nesting.zero?
213
213
  current_nesting = depth + 1
214
214
  current_nesting > @max_nesting and
215
- raise NestingError, "nesting of #{current_nesting} is too deep"
215
+ raise NestingError, "nesting of #{current_nesting} is too deep. Did you try to serialize objects with circular references?"
216
216
  end
217
217
 
218
218
  # Returns true, if circular data structures are checked,
@@ -347,6 +347,10 @@ module JSON
347
347
  dup.generate(obj, anIO)
348
348
  end
349
349
 
350
+ private def initialize_copy(_orig)
351
+ @depth = 0
352
+ end
353
+
350
354
  # Handles @allow_nan, @buffer_initial_length, other ivars must be the default value (see above)
351
355
  private def generate_json(obj, buf)
352
356
  case obj
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.15.1'
4
+ VERSION = '2.15.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.15.1
4
+ version: 2.15.2.1
5
5
  platform: java
6
6
  authors:
7
7
  - Daniel Luz
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-10-07 00:00:00.000000000 Z
10
+ date: 2026-03-18 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: A JSON implementation as a JRuby extension.
14
13
  email: dev+ruby@mernen.com
@@ -56,7 +55,6 @@ metadata:
56
55
  documentation_uri: https://docs.ruby-lang.org/en/master/JSON.html
57
56
  homepage_uri: https://github.com/ruby/json
58
57
  source_code_uri: https://github.com/ruby/json
59
- post_install_message:
60
58
  rdoc_options:
61
59
  - "--title"
62
60
  - JSON implementation for Ruby
@@ -75,8 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
73
  - !ruby/object:Gem::Version
76
74
  version: '0'
77
75
  requirements: []
78
- rubygems_version: 3.3.26
79
- signing_key:
76
+ rubygems_version: 3.6.3
80
77
  specification_version: 4
81
78
  summary: JSON Implementation for Ruby
82
79
  test_files: []