dalli 3.2.16 → 3.2.17

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: 12a8b4270f527df2231bb1c56ce5bb035c477ec752ac1315f6afb0aa8afadcfa
4
- data.tar.gz: bd82350ebd1b7c924be97b5f057e96b0d2b33b6e8ee34767f11a5b4bd58ef776
3
+ metadata.gz: 85605d05fac6cb78fd5b6a3505bf92bb3df72f80a8aecd1fc581896e0bb6bcf5
4
+ data.tar.gz: 3e1d6612ea7c0c8987bc573bc3686d0d29d184b6af2edbd737f14ec6619fc6f0
5
5
  SHA512:
6
- metadata.gz: 2014fc711d0e8165dafa5fc2d18c45f68788bc78e243f2cdee411ed64a3863ab9a810b89460bad89cf92f567283537cad4be06ad09c6e7bbb8557613f97d1893
7
- data.tar.gz: e4474495d492a13e360a00b85830694767e0441e28f69471e00b1a468c1fa139d92660ea95d1ee845e541610ecf25fa1353ea69bc03e93f18c77c3744c7eb151
6
+ metadata.gz: 6c037ec54baa774897ada2bbfce9a99f927eca9e9d7655bdfec55b56118939d6ba212057ebcaada26dc7d6761a5e2926dcbe2b018e3eb0ba249bb650a1f864ce
7
+ data.tar.gz: 2cc9822465193504397dc0af9130eabf49b08887a77ca4dd37c86160e9043b6611eb4c3eddc91275dc4a341330d4d3430bff04a7087c4272c89da5c0e31a9270
data/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  Dalli Changelog
2
2
  =====================
3
3
 
4
+ 3.2.17
5
+ ==========
6
+
7
+ Security:
8
+
9
+ - Security fixes; details will follow in the advisory.
10
+
4
11
  3.2.16
5
12
  ==========
6
13
 
@@ -176,6 +176,9 @@ module Dalli
176
176
  # a complete response, don't advance the buffer
177
177
  return [0, nil, nil, nil, nil] unless buf.bytesize >= resp_size
178
178
 
179
+ term = header_len + body_len
180
+ raise_bad_value_terminator unless buf.getbyte(term) == 13 && buf.getbyte(term + 1) == 10
181
+
179
182
  # The full response is in our buffer, so parse it and return
180
183
  # the values
181
184
  body = buf.slice(header_len, body_len)
@@ -266,11 +269,19 @@ module Dalli
266
269
 
267
270
  # Values are read by the size in the VA line, not up to the next CRLF:
268
271
  # a value can contain CRLF and can be longer than MAX_LINE_BYTES
272
+ def strip_value_terminator!(data)
273
+ data&.chomp!(TERMINATOR) || raise_bad_value_terminator
274
+ end
275
+
276
+ def raise_bad_value_terminator
277
+ raise Dalli::DalliError, "Reply value isn't followed by CRLF, so its size doesn't match the value"
278
+ end
279
+
269
280
  def read_data(data_size)
270
281
  # Checked before the terminator is added: -1 or -2 would otherwise
271
282
  # read 1 or 0 bytes and leave the connection out of step
272
283
  check_value_size!(data_size)
273
- @io_source.read(data_size + TERMINATOR.bytesize)&.chomp!(TERMINATOR)
284
+ strip_value_terminator!(@io_source.read(data_size + TERMINATOR.bytesize))
274
285
  end
275
286
  end
276
287
  end
data/lib/dalli/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dalli
4
- VERSION = '3.2.16'
4
+ VERSION = '3.2.17'
5
5
 
6
6
  MIN_SUPPORTED_MEMCACHED_VERSION = '1.4'
7
7
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dalli
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.16
4
+ version: 3.2.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter M. Goldstein
8
8
  - Mike Perham
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 1980-01-02 00:00:00.000000000 Z
12
+ date: 2026-11-14 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: logger
@@ -76,6 +77,7 @@ metadata:
76
77
  bug_tracker_uri: https://github.com/petergoldstein/dalli/issues
77
78
  changelog_uri: https://github.com/petergoldstein/dalli/blob/main/CHANGELOG.md
78
79
  rubygems_mfa_required: 'true'
80
+ post_install_message:
79
81
  rdoc_options: []
80
82
  require_paths:
81
83
  - lib
@@ -90,7 +92,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
92
  - !ruby/object:Gem::Version
91
93
  version: '0'
92
94
  requirements: []
93
- rubygems_version: 4.0.24
95
+ rubygems_version: 3.5.22
96
+ signing_key:
94
97
  specification_version: 4
95
98
  summary: High performance memcached client for Ruby
96
99
  test_files: []