Skip to content

Commit 829dc34

Browse files
committed
Allow _ in Hostnames
These are perfectly fine and are relied on by BIP 353, so we need to ensure we allow them.
1 parent 75d20e5 commit 829dc34

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lightning/src/util/ser.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,8 +1496,7 @@ impl Hostname {
14961496
s.len() <= 255 &&
14971497
s.chars().all(|c|
14981498
c.is_ascii_alphanumeric() ||
1499-
c == '.' ||
1500-
c == '-'
1499+
c == '.' || c == '_' || c == '-'
15011500
)
15021501
}
15031502
}

0 commit comments

Comments
 (0)