From 829dc34d103ef921f2346fb7e9dc1aa8fb9212e9 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 30 Sep 2024 18:03:12 +0000 Subject: [PATCH] Allow `_` in `Hostname`s These are perfectly fine and are relied on by BIP 353, so we need to ensure we allow them. --- lightning/src/util/ser.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lightning/src/util/ser.rs b/lightning/src/util/ser.rs index 21ce044e3..e27d49293 100644 --- a/lightning/src/util/ser.rs +++ b/lightning/src/util/ser.rs @@ -1496,8 +1496,7 @@ impl Hostname { s.len() <= 255 && s.chars().all(|c| c.is_ascii_alphanumeric() || - c == '.' || - c == '-' + c == '.' || c == '_' || c == '-' ) } } -- 2.39.5