feat(odoh): reject relay+target sharing an eTLD+1 #123
Reference in New Issue
Block a user
Delete Branch "feat/odoh-etld1-check"
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?
Summary
r.cloudflare.com+odoh.cloudflare.comthrough — two subdomains of the same operator collapse ODoH to ordinary DoH.UpstreamConfig::odoh_upstream(): compare registrable domains via the Public Suffix List (pslcrate) after the exact-host check.Test plan
cargo fmt --checkcargo clippy -- -D warningscargo auditcargo test(348 pass, including 4 new cases)odoh_rejects_shared_registrable_domain—r.cloudflare.com+odoh.cloudflare.com✗odoh_rejects_shared_registrable_under_multi_label_suffix—a.foo.co.uk+b.foo.co.uk✗odoh_accepts_distinct_registrable_under_multi_label_suffix—relay.foo.co.uk+target.bar.co.uk✓odoh_accepts_distinct_private_psl_suffix_subdomains—foo.github.io+bar.github.io✓ (PSL treatsgithub.ioas a public suffix)odoh-relay.numa.rs+odoh.cloudflare-dns.com) still boots cleanly