Mantis - MyDNS-NG
Viewing Issue Advanced Details
67 Global minor always 2011-09-08 16:46 2018-02-07 20:22
joezhou  
 
normal  
new 1.2.8  
open  
none    
none  
0000067: MyDNS and mydnsexport handle special characters in TXT records differently
MyDNS would automatically quote strings, and add '\' to special characters. mydnsexport would quote strings, but would not escape special characters. This creates a conflict on how strings such as DKIM domain key should be stored in the database.

For example,

# 3rdparty/bin/mydnsexport a10002.cpanel.test

default._domainkey.a10002.cpanel.test. 14400 IN TXT "k=rsa\; p=MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhALZw57zoM3vu9ujjgbfv9veMAFTxrtQ4ZTBow92z7awuuB2xGTSn2LN1UQ9rpHIB1+vX+vuoxdlKywcMj2gydxTkg/RsXu4tQiYjLGlaOW0cdujSzgk5ZKKLnPcSsatTdwIDAQAB\;"

# dig @localhost TXT default._domainkey.a10002.cpanel.test

;; ANSWER SECTION:
default._domainkey.a10002.cpanel.test. 86400 IN TXT "k=rsa\\\; p=MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhALZw57zoM3vu9ujjgbfv9veMAFTxrtQ4ZTBow92z7awuuB2xGTSn2LN1UQ9rpHIB1+vX+vuoxdlKywcMj2gydxTkg/RsXu4tQiYjLGlaOW0cdujSzgk5ZKKLnPcSsatTdwIDAQAB\\\;"

# 3rdparty/bin/mydnsexport a10002.cpanel.test

default._domainkey.a10002.cpanel.test. 14400 IN TXT "k=rsa; p=MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhALZw57zoM3vu9ujjgbfv9veMAFTxrtQ4ZTBow92z7awuuB2xGTSn2LN1UQ9rpHIB1+vX+vuoxdlKywcMj2gydxTkg/RsXu4tQiYjLGlaOW0cdujSzgk5ZKKLnPcSsatTdwIDAQAB;"

# dig @localhost TXT default._domainkey.a10002.cpanel.test

default._domainkey.a10002.cpanel.test. 86400 IN TXT "k=rsa\; p=MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhALZw57zoM3vu9ujjgbfv9veMAFTxrtQ4ZTBow92z7awuuB2xGTSn2LN1UQ9rpHIB1+vX+vuoxdlKywcMj2gydxTkg/RsXu4tQiYjLGlaOW0cdujSzgk5ZKKLnPcSsatTdwIDAQAB\;"
Also, the column size for data is too small as suggested in MyDNS manual. This would result in the truncation of larger records like DKIM domain keys.
? file icon mydns-ng-dkim.patch [^] (1,793 bytes) 2018-02-07 20:15
Issue History
2011-09-08 16:46 joezhou New Issue
2018-02-07 20:15 elrido File Added: mydns-ng-dkim.patch
2018-02-07 20:22 elrido Note Added: 0000217

Notes
(0000217)
elrido   
2018-02-07 20:22   
This is a very late reply, but only now have I hit the issues with the export of DKIM records. The patch that I attached allows for TXT records of up to 1024 bytes (given the data column is expanded accordingly).

Only the output of the mydnsexport for bind is modified, so it does not address this report in that regard.