You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It expects global variables $1 to $4 to be set, with values matching each of the ipv4 groups. The overriding === method does not set these global variables in the monkey patched implementation, so one ends up with an IPv4 object with address 0.0.0.0, because the globals are nil and nil.to_i is 0.
An example of an IPv4 dns that breaks is: Resolv.getname('167.89.116.35')
This works before the Resolv patch is applied, but breaks once Resolve has been patched.
The text was updated successfully, but these errors were encountered:
The monkeypatch for the Resolv gem is actually breaking the regex class for IPv4.
https://github.com/ruby/resolv/blob/993a1a374fcb2a91b9d26a2215ddbb116db43788/lib/resolv.rb#L2349
As far as I can tell, it's due to the code found here:
It expects global variables $1 to $4 to be set, with values matching each of the ipv4 groups. The overriding === method does not set these global variables in the monkey patched implementation, so one ends up with an IPv4 object with address 0.0.0.0, because the globals are nil and nil.to_i is 0.
An example of an IPv4 dns that breaks is:
Resolv.getname('167.89.116.35')
This works before the Resolv patch is applied, but breaks once Resolve has been patched.
The text was updated successfully, but these errors were encountered: