Bug 1474185 - ruby-libs paddr.rb:563:in `in6_addr': invalid address (IPAddr::InvalidAddressError)
Summary: ruby-libs paddr.rb:563:in `in6_addr': invalid address (IPAddr::InvalidAddress...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: ruby
Version: 26
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jeroen van Meeuwen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-24 05:41 UTC by Christoph Sievers
Modified: 2018-02-05 11:03 UTC (History)
8 users (show)

Fixed In Version: ruby-2.4.2-84.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-05 11:03:39 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github ruby ruby pull 1513 None None None 2017-12-21 21:16:19 UTC

Description Christoph Sievers 2017-07-24 05:41:47 UTC
Description of problem:

# The name of this file is bug.rb
require 'uri'
ENV['http_proxy']='http://127.0.0.1'
ENV['no_proxy']='192.0.2.2'
URI("http://example.org/").find_proxy
$ ruby bug.rb
/home/m/.rbenv/versions/2.4.0/lib/ruby/2.4.0/ipaddr.rb:563:in `in6_addr': invalid address (IPAddr::InvalidAddressError)
        from /home/m/.rbenv/versions/2.4.0/lib/ruby/2.4.0/ipaddr.rb:500:in `initialize'
        from /home/m/.rbenv/versions/2.4.0/lib/ruby/2.4.0/ipaddr.rb:518:in `new'
        from /home/m/.rbenv/versions/2.4.0/lib/ruby/2.4.0/ipaddr.rb:518:in `coerce_other'
        from /home/m/.rbenv/versions/2.4.0/lib/ruby/2.4.0/ipaddr.rb:174:in `include?'
        from /home/m/.rbenv/versions/2.4.0/lib/ruby/2.4.0/uri/generic.rb:1541:in `block in find_proxy'
        from /home/m/.rbenv/versions/2.4.0/lib/ruby/2.4.0/uri/generic.rb:1530:in `scan'
        from /home/m/.rbenv/versions/2.4.0/lib/ruby/2.4.0/uri/generic.rb:1530:in `find_proxy'
        from bug.rb:4:in `<main>'

Version-Release number of selected component (if applicable):

ruby-libs-2.4.1-79.fc26.x86_64

How reproducible:

$ http_proxy=http://127.0.0.1 no_proxy=192.0.2.2 ruby -ropen-uri -e 'open("http://example.org")'



Actual results:

see above

Comment 1 Felipe Zipitría 2017-10-06 14:59:34 UTC
I can confirm that this patch solves the problem.

Comment 2 Vít Ondruch 2018-02-05 11:03:39 UTC
This was addressed in Ruby 2.4.2


Note You need to log in before you can comment on or make changes to this bug.