]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: remove attodot feature; fixes #10254
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Thu, 23 Sep 2021 15:25:16 +0000 (17:25 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Wed, 6 Oct 2021 09:14:00 +0000 (11:14 +0200)
docs/upgrading.rst
pdns/dns.cc
pdns/dns.hh
pdns/dnsbackend.cc

index 51e630790746a01808b69cc247823c115e666198..9387cc9711ed4853aa1bb2c4b7b36080aa088f75 100644 (file)
@@ -8,9 +8,29 @@ Please upgrade to the PowerDNS Authoritative Server 4.0.0 from 3.4.2+.
 See the `3.X <https://doc.powerdns.com/3/authoritative/upgrading/>`__
 upgrade notes if your version is older than 3.4.2.
 
-4.4.x to 4.5.0 or master
+4.5.x to 4.6.0 or master
 ------------------------
 
+Automatic conversion of ``@`` signs in SOA
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Before version 4.5.0, PowerDNS would automatically replace ``@`` in the SOA RNAME with ``.``, making it easy for users to enter their hostmaster email address without having to think about syntax.
+However, this feature interacts badly with handling of presigned zones.
+In version 4.5.0, this feature was accidentally broken in the implementation of the zone cache.
+In 4.6.0, this automatic conversion is fully removed.
+If you still have ``@`` signs in any SOA RNAMEs, 4.6.0 will serve those out literally.
+
+4.4.x to 4.5.0
+--------------
+
+Automatic conversion of ``@`` signs in SOA
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Before version 4.5.0, PowerDNS would automatically replace ``@`` in the SOA RNAME with ``.``, making it easy for users to enter their hostmaster email address without having to think about syntax.
+In version 4.5.0, this feature was accidentally broken in the implementation of the zone cache, and the replacement would only happen if the zone cache was disabled.
+Note that in 4.6.0, this automatic conversion is fully removed.
+If you still have ``@`` signs in any SOA RNAMEs, 4.5.0 will serve those out literally if the zone cache is enabled.
+
 Record type changes
 ^^^^^^^^^^^^^^^^^^^
 
index cd0ce26cc6020c00572f4a5b8d21b069f62ca981..03dfff715d7845b2f8e664a5af329cd4e04623c6 100644 (file)
@@ -99,20 +99,3 @@ uint32_t hashQuestion(const char* packet, uint16_t len, uint32_t init)
   return ret;
 }
 
-
-string& attodot(string &str)
-{
-   if(str.find_first_of('@')==string::npos)
-      return str;
-
-   for (unsigned int i = 0; i < str.length(); i++)
-   {
-      if (str[i] == '@') {
-         str[i] = '.';
-         break;
-      } else if (str[i] == '.') {
-         str.insert(i++, "\\");
-      }
-   }
-   return str;
-}
index b5ca2ada1fd4c6dfd68113371f08b0e3559f7106..764ea46a810ee6a1ecb3a9076a1e7919b78a0d99 100644 (file)
@@ -243,5 +243,3 @@ struct TSIGTriplet
   DNSName name, algo;
   string secret;
 };
-
-string &attodot(string &str);  //!< for when you need to insert an email address in the SOA
index f2c86729c881bcde953d4bbd29f4acef0f8a39d7..befa19bba00c8e2d7854017543b1b006f9d21c96 100644 (file)
@@ -340,7 +340,7 @@ void fillSOAData(const string &content, SOAData &data)
 
   try {
     data.nameserver = DNSName(parts.at(0));
-    data.hostmaster = DNSName(attodot(parts.at(1))); // ahu@ds9a.nl -> ahu.ds9a.nl, piet.puk@ds9a.nl -> piet\.puk.ds9a.nl
+    data.hostmaster = DNSName(parts.at(1));
     data.serial = pdns_stou(parts.at(2).c_str());
     data.refresh = pdns_stou(parts.at(3).c_str());
     data.retry = pdns_stou(parts.at(4).c_str());