From 112923cfd309c882998c6415fd1934844496eece Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 8 Feb 2024 20:21:11 +0000 Subject: [PATCH] Reject names containing "s --- src/rr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(()); } } -- 2.39.5