From b4210e2c9003792a86386ccef9bf09227b7118f3 Mon Sep 17 00:00:00 2001 From: danielalvsaaker <30574112+danielalvsaaker@users.noreply.github.com> Date: Thu, 25 Jan 2024 09:53:34 +0100 Subject: [PATCH] Trim client secret after reading from file (#1697) Reading from file will include a line break, which results in a mismatching client secret compared to reading directly from the config. --- hscontrol/types/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hscontrol/types/config.go b/hscontrol/types/config.go index 8e619733..d9d58301 100644 --- a/hscontrol/types/config.go +++ b/hscontrol/types/config.go @@ -590,7 +590,7 @@ func GetHeadscaleConfig() (*Config, error) { if err != nil { return nil, err } - oidcClientSecret = string(secretBytes) + oidcClientSecret = strings.TrimSpace(string(secretBytes)) } return &Config{