PowerDNS / pdns

PowerDNS Authoritative, PowerDNS Recursor, dnsdist
https://www.powerdns.com/
GNU General Public License v2.0
3.72k stars 913 forks source link

auth nsupdate: duplicate entries when mixing case #8217

Open Habbie opened 5 years ago

Habbie commented 5 years ago

Short description

Our 2136-code prevents adding duplicate entries, but this fails in the face of mixed case entries.

Patching one of the existing tests like this reveals the issue:

diff --git a/regression-tests/tests/1dyndns-update-replace-cname/command b/regression-tests/tests/1dyndns-update-replace-cname/command
index 17bd7c818..3eef41f0e 100755
--- a/regression-tests/tests/1dyndns-update-replace-cname/command
+++ b/regression-tests/tests/1dyndns-update-replace-cname/command
@@ -1,22 +1,22 @@
 #!/bin/sh
-cleandig cname1.test.dyndns CNAME
+cleandig ptr1.test.dyndns PTR

 cleannsupdate <<!
 server $nameserver $port
 zone test.dyndns
-update add cname1.test.dyndns. 3600 CNAME host-2.test.dyndns.
+update add ptr1.test.dyndns. 3600 PTR host-2.test.dyndns.
 send
 answer
 !

-cleandig cname1.test.dyndns CNAME
+cleandig ptr1.test.dyndns PTR

 cleannsupdate <<!
 server $nameserver $port
 zone test.dyndns
-update add cname1.test.dyndns. 3600 CNAME host-1.test.dyndns.
+update add ptr1.test.dyndns. 3600 PTR HOST-2.test.dyndns.
 send
 answer
 !

-cleandig cname1.test.dyndns CNAME
+cleandig ptr1.test.dyndns PTR
Habbie commented 5 years ago

Fixed in #8235:

Not fixed in #8235: