mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-02 14:07:47 +09:00
Ensure we always have the key prefix when needed
This commit is contained in:
2
api.go
2
api.go
@@ -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().
|
||||
|
||||
Reference in New Issue
Block a user