From: Kees Monshouwer Date: Thu, 7 Feb 2019 13:25:14 +0000 (+0100) Subject: auth: fix dot stripping in setContent() X-Git-Tag: auth-4.1.8~5^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F7608%2Fhead;p=thirdparty%2Fpdns.git auth: fix dot stripping in setContent() (cherry picked from commit 0583946ff70d73b5da579db1d81c9c374adf2cc3) --- diff --git a/pdns/dnsrecords.cc b/pdns/dnsrecords.cc index 2f4fa33100..330e732cde 100644 --- a/pdns/dnsrecords.cc +++ b/pdns/dnsrecords.cc @@ -38,7 +38,7 @@ void DNSResourceRecord::setContent(const string &cont) { case QType::DNAME: case QType::NS: case QType::PTR: - if(!content.empty()) + if (content.size() >= 2 && *(content.rbegin()) == '.') boost::erase_tail(content, 1); } }