amq-protocol 2.8.0 → 2.9.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: 7cd695fb0f7f7cc8c9d80109f349fdba92c500b5b8eea4ff6ea2c5e6dfdddd8d
4
- data.tar.gz: 929be34e6f1bd9c2f84fded2933e9f3775286e19babbabac45ce0ccab1b3c38d
3
+ metadata.gz: 26124906b35c821e2d416aee1eac743185d3419e11adc00650811afbdc505153
4
+ data.tar.gz: 351ddaddb2d40f50fa758813548cae68f73142c3a2e4c2409e63e12a498d9e01
5
5
  SHA512:
6
- metadata.gz: 990e85acbfc80b8dbfa1be036705afdef1f96fdae2b1c8270ff00c972483925361d9dbb7807309fca6a0db55c3d795f8da34d3255f153ff463cda2d12ceed918
7
- data.tar.gz: 62f8b49269c978f162a21aced9eb22702ae676e28589da94f66b1560083c66878584a1999fa0611f4be1f205a402539b228f0d165107dc930d7a7112801cb8aa
6
+ metadata.gz: f052ec8349b5d783e191b80301ab4d517ee3521be7643eb150805ead5c889fc4e6db05c7883b9a510662b6c6846539a5b2fe6ff7a3372ead22b6ddb9c2db7476
7
+ data.tar.gz: 1fe1329bd16dd74002277aba7f796533b6206df8125d307b7668f7132c0200b8398b1aedb9ce5c732fc71fad5413e82fa2fb3b9f938062652b35ac9efe4e964a
data/ChangeLog.md CHANGED
@@ -1,6 +1,22 @@
1
- ## Changes between 2.8.0 and 2.9.0 (unreleased)
1
+ ## Changes between 2.8.0 and 2.9.0 (Aug 26, 2026)
2
+
3
+ ### amq-protocol Now Requires Ruby 3.2
4
+
5
+ Ruby 3.0 and 3.1 are end of life. The URI parser now uses
6
+ `URI.decode_uri_component`, which Ruby 3.2 provides.
7
+
8
+
9
+ ### URI Components Are Percent-Decoded, Not Form-Decoded
10
+
11
+ `AMQ::URI.parse` decoded the username, password and virtual host with
12
+ `CGI.unescape`, so a password such as `pa+ss` was parsed as `pa ss` and failed
13
+ to authenticate. They are now percent-decoded; use `%20` where a `+` used to
14
+ mean a space.
15
+
16
+ Contributed by @eglitobias.
17
+
18
+ GitHub issue: [#89](https://github.com/ruby-amqp/amq-protocol/pull/89)
2
19
 
3
- No changes yet.
4
20
 
5
21
  ## Changes between 2.7.0 and 2.8.0 (Apr 25, 2026)
6
22
 
data/README.md CHANGED
@@ -9,6 +9,8 @@ needs for you, including RabbitMQ extensions to AMQP 0.9.1.
9
9
 
10
10
  ## Supported Ruby Versions
11
11
 
12
+ * amq-protocol `2.9.0` requires Ruby 3.2 or later
13
+ * amq-protocol `2.8.0` requires Ruby 3.0 or later
12
14
  * amq-protocol `2.3.4` has fixes for Ruby 3.5 compatibility
13
15
  * amq-protocol `2.3.3` has fixes for Ruby 3.4 compatibility
14
16
  * amq-protocol `2.3.0` only supports Ruby 2.2+.
@@ -1,5 +1,5 @@
1
1
  module AMQ
2
2
  module Protocol
3
- VERSION = "2.8.0"
3
+ VERSION = "2.9.0"
4
4
  end # Protocol
5
5
  end # AMQ
data/lib/amq/uri.rb CHANGED
@@ -1,10 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
- if RUBY_VERSION < "3.5"
4
- require "cgi/util"
5
- else
6
- require "cgi/escape"
7
- end
8
3
  require "uri"
9
4
 
10
5
  module AMQ
@@ -38,8 +33,8 @@ module AMQ
38
33
  opts = DEFAULTS.dup
39
34
 
40
35
  opts[:scheme] = uri.scheme
41
- opts[:user] = ::CGI::unescape(uri.user) if uri.user
42
- opts[:pass] = ::CGI::unescape(uri.password) if uri.password
36
+ opts[:user] = ::URI.decode_uri_component(uri.user) if uri.user
37
+ opts[:pass] = ::URI.decode_uri_component(uri.password) if uri.password
43
38
  opts[:host] = uri.host if uri.host and uri.host != ""
44
39
  opts[:port] = uri.port || AMQP_DEFAULT_PORTS[uri.scheme]
45
40
  opts[:ssl] = uri.scheme.to_s.downcase =~ /amqps/i # TODO: rename to tls
@@ -47,7 +42,7 @@ module AMQ
47
42
  if $1.index('/')
48
43
  raise ArgumentError, "#{uri} has multiple-segment path; please percent-encode any slashes in the vhost name (e.g. /production => %2Fproduction). Learn more at http://bit.ly/amqp-gem-and-connection-uris"
49
44
  end
50
- opts[:vhost] = ::CGI::unescape($1)
45
+ opts[:vhost] = ::URI.decode_uri_component($1)
51
46
  end
52
47
 
53
48
  if uri.query
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.8.0
4
+ version: 2.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Stastny
@@ -10,7 +10,7 @@ authors:
10
10
  - Mark Abramov
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2026-04-26 00:00:00.000000000 Z
13
+ date: 1980-01-02 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: |2
16
16
  amq-protocol is an AMQP 0.9.1 serialization library for Ruby. It is not a
@@ -54,14 +54,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - ">="
56
56
  - !ruby/object:Gem::Version
57
- version: '3.0'
57
+ version: '3.2'
58
58
  required_rubygems_version: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  requirements: []
64
- rubygems_version: 3.6.2
64
+ rubygems_version: 4.0.16
65
65
  specification_version: 4
66
66
  summary: AMQP 0.9.1 encoding & decoding library.
67
67
  test_files: []