URI.host does not unwrap IPv6 bracket notation
URI implementation in Ruby does not convert IPv6 bracket notation to plain IPv6 address, in other words it does not remove those brackets. We often use URI class to parse input and then uri.host is used to construct other URI/URL or directly connect to hostname/IP. This will fail if the URI had IPv6 notation. This behavior will not be changed in ruby as discussed in https://bugs.ruby-lang.org/issues/3788 and new method called "hostname" was introduced instead to unwrap IPv6 brackets:
> u = URI.parse("http://[fd00:aaaa:bbbb:cc::1]:8888") => #<URI::HTTP http://[fd00:aaaa:bbbb:cc::1]:8888> > u.host => "[fd00:aaaa:bbbb:cc::1]" > u.hostname => "fd00:aaaa:bbbb:cc::1"
We need to replace all "uri.host" to "uri.hostname" in Foreman, Katello and other plugins.