redis / redis-rb

A Ruby client library for Redis
MIT License
3.98k stars 1.03k forks source link

5.x seems to break IPv6 URL parsing #1274

Closed chen-anders closed 7 months ago

chen-anders commented 7 months ago

Reproduction case in an IPv6 EKS cluster:

irb(main):024:0> rc = Redis.new(url: "redis://[fd1b:ac4a:ab80::fcf]:6379/0", timeout:1)
=> #<Redis client v5.2.0 for redis://fd1b:ac4a:ab80::fcf:6379>
irb(main):025:0> rc.ping
/usr/local/lib/ruby/3.2.0/uri/rfc3986_parser.rb:66:in `split': bad URI(is not URI?): "redis://fd1b:ac4a:ab80::fcf:6379" (URI::InvalidURIError)
irb(main):001:0> rc = Redis.new(url: "redis://[fd1b:ac4a:ab80::fcf]:6379/0", timeout:1)
=> #<Redis client v4.8.1 for redis://fd1b:ac4a:ab80::fcf:6379/0>
irb(main):002:0> rc.ping
=> "PONG"
chen-anders commented 7 months ago

Nevermind - this might be a red-herring coming from the dd-trace gem.