From 8504d0d8badf922ed8314d57ed81933587a0ecbc Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Sun, 24 Apr 2022 21:12:45 +0100 Subject: [PATCH] Move todo to correct file --- api.go | 2 ++ namespaces.go | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api.go b/api.go index dcdf49a1..3d85d1ef 100644 --- a/api.go +++ b/api.go @@ -133,6 +133,8 @@ func (h *Headscale) RegistrationHandler(ctx *gin.Context) { return } + + // TODO(kradalby): We need these fields to be unique, we need to add a hash or something at the end. normalizedHostname, err := NormalizeToFQDNRules( req.Hostinfo.Hostname, h.cfg.OIDC.StripEmaildomain, diff --git a/namespaces.go b/namespaces.go index 9f7ba262..bb32795a 100644 --- a/namespaces.go +++ b/namespaces.go @@ -237,7 +237,6 @@ func (n *Namespace) toProto() *v1.Namespace { } } -// TODO(kradalby): We need these fields to be unique, we need to add a hash or something at the end. // NormalizeToFQDNRules will replace forbidden chars in namespace // it can also return an error if the namespace doesn't respect RFC 952 and 1123. func NormalizeToFQDNRules(name string, stripEmailDomain bool) (string, error) {