]> git.bitcoin.ninja Git - dnssec-prover/commitdiff
Force all names to lowercase ASCII as it is the canonical form
authorMatt Corallo <git@bluematt.me>
Mon, 26 Feb 2024 04:41:58 +0000 (04:41 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 26 Feb 2024 20:44:36 +0000 (20:44 +0000)
src/rr.rs

index 1755685cabb527075526cb8ec14a28d490117c1a..f7faef51b58520d5600e0e106952a1f253ca53d8 100644 (file)
--- a/src/rr.rs
+++ b/src/rr.rs
@@ -65,7 +65,7 @@ impl TryFrom<String> for Name {
                        if label.len() > 63 { return Err(()); }
                }
 
-               Ok(Name(s))
+               Ok(Name(s.to_ascii_lowercase()))
        }
 }
 impl TryFrom<&str> for Name {