feat(odoh): reject relay+target sharing an eTLD+1
Plain host-string equality caught the copy-paste-same-URL footgun but let `r.cloudflare.com` + `odoh.cloudflare.com` through — two subdomains of the same operator collapse ODoH to ordinary DoH. Add a second layer: compare registrable domains via the PSL (`psl` crate) after the exact- host check. Fails open on IP literals and unparseable hosts; the exact- host check still runs in those cases.
This commit is contained in:
@@ -30,6 +30,7 @@ tokio-rustls = "0.26"
|
||||
arc-swap = "1"
|
||||
ring = "0.17"
|
||||
odoh-rs = "1"
|
||||
psl = "2"
|
||||
# rand_core 0.9 matches the version odoh-rs (via hpke 0.13) depends on, so we
|
||||
# share one RngCore trait and OsRng impl across the dep tree.
|
||||
rand_core = { version = "0.9", features = ["os_rng"] }
|
||||
|
||||
Reference in New Issue
Block a user