From 41efe98953388f62120f7ea3f7d94d1cccb3de32 Mon Sep 17 00:00:00 2001 From: Adrien Raffin-Caboisse Date: Mon, 7 Mar 2022 23:20:30 +0100 Subject: [PATCH] fix: apply fmt and fix missing name changes --- acls.go | 2 +- api.go | 1 + poll.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/acls.go b/acls.go index e542a0f3..63c3955c 100644 --- a/acls.go +++ b/acls.go @@ -444,7 +444,7 @@ func expandGroup( errInvalidGroup, ) } - grp, err := NormalizeName(group, stripEmailDomain) + grp, err := NormalizeToFQDNRules(group, stripEmailDomain) if err != nil { return []string{}, fmt.Errorf( "failed to normalize group %q, err: %w", diff --git a/api.go b/api.go index fec79a2f..b5e885a1 100644 --- a/api.go +++ b/api.go @@ -144,6 +144,7 @@ func (h *Headscale) RegistrationHandler(ctx *gin.Context) { Str("func", "RegistrationHandler"). Str("hostinfo.name", req.Hostinfo.Hostname). Err(err) + return } diff --git a/poll.go b/poll.go index 0bdd80c6..15945a9b 100644 --- a/poll.go +++ b/poll.go @@ -83,7 +83,7 @@ func (h *Headscale) PollNetMapHandler(ctx *gin.Context) { Str("machine", machine.Name). Msg("Found machine in database") - hname, err := NormalizeName( + hname, err := NormalizeToFQDNRules( req.Hostinfo.Hostname, h.cfg.OIDC.StripEmaildomain, )