From: Matt Corallo Date: Thu, 8 Feb 2024 20:21:11 +0000 (+0000) Subject: Reject names containing "s X-Git-Tag: v0.5.4~79 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=112923cfd309c882998c6415fd1934844496eece;p=dnssec-prover Reject names containing "s --- diff --git a/src/rr.rs b/src/rr.rs index c80bfbb..d3a6dd4 100644 --- a/src/rr.rs +++ b/src/rr.rs @@ -33,7 +33,7 @@ impl TryFrom for Name { if s.is_empty() { return Err(()); } if *s.as_bytes().last().unwrap_or(&0) != b"."[0] { return Err(()); } if s.len() > 255 { return Err(()); } - if s.chars().any(|c| !c.is_ascii_graphic() && c != '.' && c != '-') { return Err(()); } + if s.chars().any(|c| !c.is_ascii_graphic() || c == '"') { return Err(()); } for label in s.split(".") { if label.len() > 63 { return Err(()); } }