Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRANSIP: TXT-records incorrectly passed (with quotes) #2702

Closed
cafferata opened this issue Dec 8, 2023 · 5 comments
Closed

TRANSIP: TXT-records incorrectly passed (with quotes) #2702

cafferata opened this issue Dec 8, 2023 · 5 comments

Comments

@cafferata
Copy link
Collaborator

cafferata commented Dec 8, 2023

The DNS TXT-records are incorrectly passed to TransIP (with quotes).

dig jcid.nl. TXT
; <<>> DiG 9.10.6 <<>> jcid.nl. TXT
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5537
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;jcid.nl.			IN	TXT

;; ANSWER SECTION:
jcid.nl.		86400	IN	TXT	"facebook-domain-verification=6uw144ekdcho9313m6s4tf50gbpxt8"
jcid.nl.		86400	IN	TXT	"pinterest-site-verification=1b9ccc530d0a8f711c7203e050d657a0"
jcid.nl.		86400	IN	TXT	"slack-domain-verification=8qbnweAyPOkmNkQyWcJQO2zWhWfPq0iWMX7YYFmC"
-jcid.nl.		86400	IN	TXT	"v=spf1 include:spf.jcid.nl include:_spf.google.com include:spf.mandrillapp.com include:_spf.exactonline.nl -all"
+jcid.nl.		86400	IN	TXT	"\"v=spf1 include:spf.jcid.nl include:_spf.google.com include:spf.mandrillapp.com include:_spf.exactonline.nl -all\""

;; Query time: 70 msec
;; SERVER: *******#53(*******)
;; WHEN: Fri Dec 08 19:56:15 CET 2023
;; MSG SIZE  rcvd: 384

Reproducible DNSControl config

D('jcid.nl',
    PROVIDER_NONE,
    DnsProvider(PROVIDER_TRANSIP),
    SPF_BUILDER({
        label: '@',
        parts: [
            'v=spf1',
            '-all'
        ]
    })
);

Screenshot 2023-12-08 at 20 05 59

cc: @blackshadev

@cafferata cafferata changed the title TRANSIP: SPF-record TRANSIP: TXT-records incorrectly passed (with quotes) Dec 8, 2023
@blackshadev
Copy link
Contributor

Oh that is weird. I know for a fact it used to work since I used this my self, but I was probably on an older version.

Just to check, can you verify this is also the case for the version which is not on master ?

I will look into it when I got the time , it should be an easy and quick thing to fix.

@tlimoncelli
Copy link
Contributor

I'm the last to modify that code therefore this is probably my fault. My apologies.

I haven't found an automated way to detect this bug. However, I did write up a manual way to test this here:

https://docs.dnscontrol.org/developer-info/testing-txt-records

@cafferata
Copy link
Collaborator Author

ef081da / #2673

git checkout ef081da1a6c8327ac1b27672f21a23c836b6ca7d
go build
dnscontrol preview --domains jcid.nl
******************** Domain: jcid.nl
Done. 0 corrections.

cbccbbe / #2631

git checkout cbccbbeb8d981bcd688de1ee6ef8efe8df8a56d9
go build
dnscontrol preview --domains jcid.nl
******************** Domain: jcid.nl
6 corrections (transip)
#1: [2/2] delete: ± MODIFY jcid.nl TXT ("v=spf1include:spf.jcid.nlinclude:_spf.google.cominclude:spf.mandrillapp.cominclude:_spf.exactonline.nl-all" ttl=86400) -> ("v=spf1 include:spf.jcid.nl include:_spf.google.com include:spf.mandrillapp.com include:_spf.exactonline.nl -all" ttl=86400)
#2: [1/2] create: ± MODIFY jcid.nl TXT ("v=spf1include:spf.jcid.nlinclude:_spf.google.cominclude:spf.mandrillapp.cominclude:_spf.exactonline.nl-all" ttl=86400) -> ("v=spf1 include:spf.jcid.nl include:_spf.google.com include:spf.mandrillapp.com include:_spf.exactonline.nl -all" ttl=86400)
Done. 2 corrections.

@cafferata
Copy link
Collaborator Author

cafferata commented Dec 8, 2023

However, I did write up a manual way to test this here:
https://docs.dnscontrol.org/developer-info/testing-txt-records

Done!

TXT("t0", "test0"),
TXT("t1", "\"test1\""),
TXT("t2", "test2"),
TXT("t3", "\"test3\""),
dnscontrol preview --domains jcid.nl
2023/12/08 23:01:50 printIR.go:107: 2 Validation errors:
2023/12/08 23:01:50 printIR.go:113: ERROR: TRANSIP rejects domain jcid.nl: txtstring contains doublequotes
2023/12/08 23:01:50 printIR.go:113: ERROR: TRANSIP rejects domain jcid.nl: txtstring contains doublequotes
exiting due to validation errors
TXT("t0", "test0"),
TXT("t2", "test2"),
dnscontrol preview --domains jcid.nl
******************** Domain: jcid.nl
2 corrections (transip)
#1: - DELETE t1.jcid.nl TXT "test1" ttl=86400
#2: - DELETE t3.jcid.nl TXT "test3" ttl=86400
Done. 2 corrections.

@blackshadev
Copy link
Contributor

Fixed in #2708

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants