amq-protocol 2.9.0 → 2.10.0

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: 26124906b35c821e2d416aee1eac743185d3419e11adc00650811afbdc505153
4
- data.tar.gz: 351ddaddb2d40f50fa758813548cae68f73142c3a2e4c2409e63e12a498d9e01
3
+ metadata.gz: c9d86e9107594df07b07d144717a895fb0551f09274e7b02dd6d9133837a8b18
4
+ data.tar.gz: e7bfe990d54202a39787157e89fddbca53214a9045514cacf3e9055939171e9b
5
5
  SHA512:
6
- metadata.gz: f052ec8349b5d783e191b80301ab4d517ee3521be7643eb150805ead5c889fc4e6db05c7883b9a510662b6c6846539a5b2fe6ff7a3372ead22b6ddb9c2db7476
7
- data.tar.gz: 1fe1329bd16dd74002277aba7f796533b6206df8125d307b7668f7132c0200b8398b1aedb9ce5c732fc71fad5413e82fa2fb3b9f938062652b35ac9efe4e964a
6
+ metadata.gz: bb6d4dbd04ebd7526c4c12c13d2ad37e71912b7084b4459fc0694942c6e1cf814c9aa1315546e5b4e180145bb3a54c67e0c237250ddd1772e7fca5085e0eb5c1
7
+ data.tar.gz: 502a34f35b6dc6a6962f614a43bd0fa7a745bc1a46112174e544fbf151b8a6da5ddccbc76181ba5084510f4e6cefceb9121beca04d4b6049bfab6e55cd13399a
data/ChangeLog.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## Changes between 2.9.0 and 2.10.0 (Nov 2, 2026)
2
+
3
+ ### TLS Peer Verification Is No Longer Disabled by Default
4
+
5
+ An `amqps://` URI without `?verify=` no longer disables peer verification,
6
+ so clients such as Bunny apply their own default (`verify_peer: true` in Bunny's case).
7
+ Use `?verify=false` to opt out.
8
+
9
+ Brokers with self-signed or private-CA certificates now need `?cacertfile=`
10
+ in the URI.
11
+
12
+ Reported by Matthew Mongeau (Ruby Central).
13
+
14
+ GitHub advisory: [GHSA-499w-x7r4-fw7p](https://github.com/ruby-amqp/amq-protocol/security/advisories/GHSA-499w-x7r4-fw7p)
15
+
16
+
1
17
  ## Changes between 2.8.0 and 2.9.0 (Aug 26, 2026)
2
18
 
3
19
  ### amq-protocol Now Requires Ruby 3.2
@@ -1,5 +1,5 @@
1
1
  module AMQ
2
2
  module Protocol
3
- VERSION = "2.9.0"
3
+ VERSION = "2.10.0"
4
4
  end # Protocol
5
5
  end # AMQ
data/lib/amq/settings.rb CHANGED
@@ -33,8 +33,8 @@ module AMQ
33
33
 
34
34
  # ssl parameters
35
35
  ssl: false,
36
- verify: false,
37
- fail_if_no_peer_cert: false,
36
+ verify: nil,
37
+ fail_if_no_peer_cert: nil,
38
38
  cacertfile: nil,
39
39
  certfile: nil,
40
40
  keyfile: nil
@@ -57,8 +57,8 @@ module AMQ
57
57
  # @option settings [Integer] :connection_timeout (nil) Time in milliseconds to wait while establishing a TCP connection to the server before giving up.
58
58
  # @option settings [Fixnum] :channel_max (nil) Maximum number of channels to permit on this connection.
59
59
  # @option settings [Array] :auth_mechanism ([]) SASL authentication mechanisms to consider when negotiating a mechanism with the server. This parameter can be specified multiple times to specify multiple mechanisms, e.g. `?auth_mechanism=plain&auth_mechanism=amqplain`.
60
- # @option settings [Boolean] :verify (false) Controls peer verification mode.
61
- # @option settings [Boolean] :fail_if_no_peer_cert (false) When set to true, TLS connection will be rejected if client fails to provide a certificate.
60
+ # @option settings [Boolean] :verify (nil) Controls peer verification mode. nil means "not specified", leaving the default to the client.
61
+ # @option settings [Boolean] :fail_if_no_peer_cert (nil) When set to true, TLS connection will be rejected if client fails to provide a certificate.
62
62
  # @option settings [String] :cacertfile (nil) Certificate Authority (CA) certificate file path.
63
63
  # @option settings [String] :certfile (nil) Server certificate file path.
64
64
  # @option settings [String] :keyfile (nil) Server private key file path.
data/lib/amq/uri.rb CHANGED
@@ -17,8 +17,8 @@ module AMQ
17
17
  connection_timeout: nil,
18
18
  channel_max: nil,
19
19
  auth_mechanism: [],
20
- verify: false,
21
- fail_if_no_peer_cert: false,
20
+ verify: nil,
21
+ fail_if_no_peer_cert: nil,
22
22
  cacertfile: nil,
23
23
  certfile: nil,
24
24
  keyfile: nil
@@ -69,11 +69,13 @@ module AMQ
69
69
  end
70
70
 
71
71
  %w(verify fail_if_no_peer_cert).each do |tls_option|
72
- if query_params[tls_option] && uri.scheme == "amqp"
72
+ # absent means "not specified" so that clients can apply their own (secure) defaults
73
+ next if query_params[tls_option].nil?
74
+
75
+ if uri.scheme == "amqp"
73
76
  raise ArgumentError, "The option '#{tls_option}' can only be used in URIs that use amqps schema"
74
- else
75
- opts[tls_option.to_sym] = as_boolean(query_params[tls_option])
76
77
  end
78
+ opts[tls_option.to_sym] = as_boolean(query_params[tls_option])
77
79
  end
78
80
  end
79
81
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amq-protocol
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.0
4
+ version: 2.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Stastny