-
Notifications
You must be signed in to change notification settings - Fork 400
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
The content field of TXT records must be in quotation marks, but is not? #3172
Comments
CC @tresni Hi @pro-sumer ! Can you provide a working example that demonstrates the bug? (i.e. a repro case) Tom |
Sure! For this entry in my DNS config:
I get this complaint on the Cloudflare dashboard:
for this generated
|
@tresni Could you investigate? (Note: I suspect the bug may be that CF shouldn't be displaying this warning) |
It only popped up recently, without any changes on the DNSControl side, so I would not rule that out either... |
On the other hand, they are pretty explicit about the quotation marks in their help pages about TXT records:
|
Originally posted (13 jun.) by @janik-cloudflare in Cloudflare community: Importing TXT records adds quotes, breaking records (comment)
Originally posted (11 sep.) by @janik-cloudflare in Cloudflare community: Warning for TXT records without double quotes (comment)
|
I think they've confused the RFC 1035 file format and the wire-format of the txt record. Let me get some popcorn. This is going to be fun to watch. |
Could you elaborate, @tlimoncelli? I think the warning is correct. We try to follow RFC 1035 zone file format for all record contents, and we do for all record types, with the only exception being unquoted TXT records, which are interpreted (by Cloudflare) in a way that differs how RFC-compliant parsers would interpret them. That's why they're discouraged. For example, a content of Some other providers also allow unquoted inputs that they treat as a single string as much as possible, but quoted strings seem like the more correct and unambiguous representation. Would it not be possible to switch to |
Here's my understanding of what cloudflare proposes:
Am I understanding the situation correctly? If so, my feedback is...
That's a terrible user experience. Instead, it should accept a string of any length (with some reasonable limit), and behind-the-scenes segment it into 255-octet chunks. Hide all the segmentation from the users. Users don't need to see that. If a customer wants to dictate that a TXT record should be (for example) two segments: one containing (and if you really, really, really, want to support such a user, then tell them to use the API for TXT record updates... The web is for humans, APIs are for robot... and they're asking to be treated like a robot.)
I'd be glad to go into more details, but let's focus on the web ui. |
After writing that long message above, I realized a much more simply way to say it is: Why would any TXT data sent via the API result in an error? If I send |
Not quite. The Cloudflare dashboard already converts it to RFC 1035 syntax today, adding explicit quotes, and I don't think there are any plans to change that in the foreseeable future. For UI purposes, when the input isn't quoted, everything is treated as a single string (unless of course the 255-byte limit is exceeded). The warning in the UI is only shown next to old records and records created through the API (which currently keeps the verbatim content without adding quotes).
As much as I want to agree, we do unfortunately need to support this. For example, TXT records transferred via Secondary DNS from another provider could look like that. If we split those differently, we'd be violating RFCs and breaking DNSSEC validation.
They can use both. The UI detects if the input is quoted and only adds quotes if some aren't already there.
We'd like to get there, but preferably by actually changing the content on the API level too, actually adding quotes if missing instead of, say, allowing two different representations for the same content ( cc @hannes-cf |
Yes, I wouldn't want to break support for zone transfers to/from secondaries, nor break DNSSEC. That's not what I was proposing. If I wasn't clear, my suggestion was to maintain the native segmentation internally and only present the "one long string" version at the user-interface level. It sounds like what you are proposing is a text field for inputting the TXT data:
It seems like you believe there are humans that use your web UI that want to micro-manage how their TXT records are chunked. I've been maintaining DNS systems since 1991 and I've never met such a human. However, I haven't met everyone on the internet yet. So, I defer to you on this. Here's how I see this playing out:
When the user returns to edit it, they see it has been changed to:
Confused, they open up a support case. The reply is something about RFC 1035, quotes, and... whatever. The user doesn't understand but decides to live with it. The head of support if miffed at all the support cases asking about this. However...
What they enter is: `"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAo5AKo/9BzmuQayaVlKdRbzchdun/WswHB5lkDkW8oFlkixcUKpxgspOhy944IE+r31RJ+wZWvSfrceccimKtEopOtkJSNzLrwXSKGLYBEvQSXoUeLCtQljvAUpZ2pESgeWjc2yTtTgHNpMxw9J5+c0aaZ623AnojGdvhNkJoMPdJfZ/nN6Py5d5RzcQX0XFSdsmzO3yf9T5Rs95GWdZM5Gc9VT+vKZj1b3cM8zwZGT10xxrzyCzycBhoaihKueI1/XmVuK/RzFA0jshj2s6J8uKV151TSzDT9dcX+Q4U9H+N/IirVrYH20lFKwhEetG+RaEALLaM7QLlM6C5XmIIOQIDAQAB" The web UI display an error because the quoted text is longer than 255 octets. They open a support case and are told to split the string into a 255-octet string and a 155-octet string. The user replies: Why should I have to count out 255 chars when computers are much better at counting than humans. This seems like something the computer should do for them. Oh, and they also ask, "what's an octet?" Customer support explains that they should remove the quotes and everything will be ok. Customer replies, "but last time you told me I needed the quotes!" Customer walks away miffed.
(from what you've written I believe this case won't happen but I thought I'd include it to verify) They are surprised when they do a "dig" and see the space was removed. They open a support case about this obvious bug. They are miffed when they're told there's because of RFC 1035 they were technically wrong for entering a space without surrounding it with quotes. They reply, "No other DNS service makes me do that." I'll end with this suggestion: Why now have the web UI include a checkbox labeled "RFC 1035 format". If unchecked, users can enter any string they want and all chunking/escaping/quoting is done for them invisibly for them. If it is checked, they have to enter the text perfectly quoted and split into no-more-than-255-octet segments. That way everything is explicit and therefore less confusing to the users. Also, you can collect stats to see if anyone ever checks the checkbox. |
Not proposing; this is already (more or less) how the UI behaves today.
That would not happen; overlong strings are split automatically.
Indeed, this also would not happen.
Yes, something similar to that is on our list of ideas for the future. |
@janik-cloudflare Thank you for taking the time to hear my concerns. |
Describe the bug
Cloudflare is complaining about
TXT
entries (including those fromSPF_BUILDER
andDMARC_BUILDER
entries):To Reproduce
Steps to reproduce the behavior:
TXT
entriesExpected behavior
No warnings/errors in Cloudflare dashboard
DNS Provider
Additional context
N/A
The text was updated successfully, but these errors were encountered: