The rrToString() and rrSet() methods of Net_DNS2_RR_URI used cleanString() and Net_DNS2_Packet::expand() (respectively) to munge the final part of the RR's rdata.
However these functions assume that what they are being given is a domain name, but a URI is not a domain name: for example, a trailing dot is permissable in URIs and should be preserved, and URIs are not compressed in the same way that domain names are in packets, so the target property of a Net_DNS2_RR_URI record is always NULL as Net_DNS2_Packet::expand() will always return NULL if it cannot successfully expand a compressed name.
This pull request fixes the rrToString() and rrSet() methods of Net_DNS2_RR_URI.
The
rrToString()
andrrSet()
methods ofNet_DNS2_RR_URI
usedcleanString()
andNet_DNS2_Packet::expand()
(respectively) to munge the final part of the RR's rdata.However these functions assume that what they are being given is a domain name, but a URI is not a domain name: for example, a trailing dot is permissable in URIs and should be preserved, and URIs are not compressed in the same way that domain names are in packets, so the
target
property of aNet_DNS2_RR_URI
record is alwaysNULL
asNet_DNS2_Packet::expand()
will always returnNULL
if it cannot successfully expand a compressed name.This pull request fixes the
rrToString()
andrrSet()
methods ofNet_DNS2_RR_URI
.