Missing check whether IP version is right on resolve
kelunik opened this issue · comments
Niklas Keller commented
Calling resolve with an IP address currently simply resolves to chat address. But it doesn't check whether it's allowed by the current "types"
in $options
:
var_dump(yield Amp\Dns\resolve('8.8.8.8', ['types' => Amp\Dns\Record::AAAA]));
works just fine, but should result in an exception, because no records found. Or for the A
→ AAAA
case, we can rewrite it to an IPv6 address.
Niklas Keller commented
This will be resolved in the Amp v2 version.