Audit fixes

This commit is contained in:
jdl
2026-06-16 08:10:37 +02:00
parent 2b8cc86077
commit a2fe8dc79d
2 changed files with 2 additions and 2 deletions

View File

@@ -55,7 +55,7 @@ func Network_Validate(c *Network) error {
}
func Peer_Sanitize(p *Peer) {
p.Name = strings.TrimSpace(p.Name)
p.Name = strings.TrimSpace(strings.ToLower(p.Name))
if len(p.Addr4) != 0 {
if addr, ok := netip.AddrFromSlice(p.Addr4); ok {
// Unmap so an IPv4-mapped form is stored canonically as 4 bytes.