DNS: TXT: parse multi-"quoted strings", where some are not quoted

Version 1.58


During cpmove conversion, it was found some TXT records had long single lines, but were quoted in an odd fashion, although valid to bind. DA was not parsing this correctly. eg: default._domainkey 14400 IN TXT "v=DKIM1; k=rsa; p=MIIB...cryb" Hfdt...QAB\; where the "v=DKIM" portion was quoted, but there was a trailing non-quoted string, with escaped semi-colon. DA's db read function has been updated to chunk these pieces, and re-assemble them into one long string, eg: "v=DKIM1; k=rsa; p=MIIB...crybHfdt...QAB" where the entire string is quoted, and the trailing \; is removed, as it's not needed. When saving (assuming wrap_long_dns_values=1 is set, which it should be), DA will then chunk the items in it's desired format, eg: default._domainkey 14400 IN TXT ( "v=DKIM1; k=rsa; p=MIIB...GA7" "xiO...zEJ" "AIT...QAB" ) Note: for documentation purposes, some long strings have chunks replaced with "..." for easier reading.

Interested to try DirectAdmin? Get a 30-day Free Trial!