Ensure we always have the key prefix when needed

This commit is contained in:
Kristoffer Dalby committed 2021-11-27 20:25:12 +00:00
1 parent c38f00fab8
commit 59aeaa8476
6 files changed
+38 -8

No files matched your search

+1 -1
View File
@@ -75,7 +75,7 @@ func (h *Headscale) RegistrationHandler(ctx *gin.Context) {
machineKeyStr := ctx.Param("id")
var machineKey key.MachinePublic
err := machineKey.UnmarshalText([]byte(machineKeyStr))
err := machineKey.UnmarshalText([]byte(MachinePublicKeyEnsurePrefix(machineKeyStr)))
if err != nil {
log.Error().
Caller().