]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: fix dot stripping in setContent() 7608/head
authorKees Monshouwer <mind04@monshouwer.org>
Thu, 7 Feb 2019 13:25:14 +0000 (14:25 +0100)
committerErik Winkels <erik.winkels@powerdns.com>
Thu, 21 Mar 2019 11:32:32 +0000 (12:32 +0100)
(cherry picked from commit 0583946ff70d73b5da579db1d81c9c374adf2cc3)

pdns/dnsrecords.cc

index 2f4fa33100d485eadc3f17451a2bffb94a36c5fb..330e732cde96f224e1a34f54fbf73c33d7f18833 100644 (file)
@@ -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);
   }
 }