mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[PR #2419] [MERGED] Encode and decode CAA issuer name as ASCII only #3028
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#3028
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hickory-dns/hickory-dns/pull/2419
Author: @divergentdave
Created: 9/4/2024
Status: ✅ Merged
Merged: 9/5/2024
Merged by: @djc
Base:
main← Head:david/caa-issuer-name-ascii📝 Commits (1)
45cae16Encode and decode CAA issuer name as ASCII only📊 Changes
1 file changed (+25 additions, -2 deletions)
View changed files
📝
crates/proto/src/rr/rdata/caa.rs(+25 -2)📄 Description
This changes CAA issuer name encoding and decoding to use
LabelEncAsciiinstead ofLabelEncUtf8. This allows a couple more characters than the "LDH-Label form" that RFC 8659 prescribes (underscore and asterisk), but it's a lot closer.This closes #2353 as it fixes the last round-trip failure identified. A minimal reproducer unit test is included. The cause was a bit different than I previously diagnosed, now that I have manually reduced the input. A non-ASCII Unicode character in the label is a prerequisite, because this causes the label to be round-tripped through punycode internally when it's stored as a
Label. The IDNA code path for encoding a name to UTF-8 doesn't escape the.characters that were decoded from\.in the input, whileLabel::write_ascii()does.The IDNA mapping table says that
.is a "valid" code point, but on the other hand, UTS #46 says in its validity criteria that labels must not contain it. Theidnacrate'sto_unicode()method, used inimpl Display for Label, is intended for operating on a whole domain at a time, not a label at a time, so it splits the input it receives on dots, applies the validation rules to its view of the labels, and then re-joins them with dots. Separately, it might make sense to add an extra step to the IDNA-to-UTF-8 encoding codepath to encode dots.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.