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

Not able to create a TXT record that contains Double quotes #115

Open
maltsaar opened this issue Nov 20, 2024 · 1 comment
Open

Not able to create a TXT record that contains Double quotes #115

maltsaar opened this issue Nov 20, 2024 · 1 comment

Comments

@maltsaar
Copy link

Is there any way to create a TXT record that contains Double quotes?

  - ttl: 120
    type: TXT
    value: Hello world

and

  - ttl: 120
    type: TXT
    value: '"Hello world"'

both result in:

Image

  - ttl: 120
    type: TXT
    value: \"Hello world\"

results in:

Image

How do I get the following result?

Image

@ross
Copy link
Contributor

ross commented Nov 20, 2024

As far as I can tell it's not possible to create a unquoted TXT value in CF. If I enter "Hello World" in the UI:

Image

and dig gives me:


; <<>> DiG 9.10.6 <<>> TXT _digme.xormedia.com. @ben.ns.cloudflare.com.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2464
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;_digme.xormedia.com.		IN	TXT

;; ANSWER SECTION:
_digme.xormedia.com.	300	IN	TXT	"Hello World"

;; Query time: 10 msec
;; SERVER: 108.162.193.103#53(108.162.193.103)
;; WHEN: Wed Nov 20 13:45:05 PST 2024
;; MSG SIZE  rcvd: 72

If I enter Hello World, no quotes, in the UI it adds the quotes back once saved:

Image

and dig returns the same (quoted) thing.

In both cases the API returns the string quoted:

['_digme',
 {'octodns': {'cloudflare': {'auto-ttl': True}},
  'ttl': 500,
  'type': 'TXT',
  'value': '"Hello World"'}]

All of this matches the behavior of octoDNS's YamlProvider, which effectively treats Hello World and "Hello World" the same.

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

2 participants