Merge pull request #320182 from NixOS/backport-318832-to-release-24.05

[Backport release-24.05] headscale: backport trim of oidc secret path
This commit is contained in:
Adam C. Stephens 2024-06-16 09:13:11 -04:00 committed by GitHub
commit 49f5c16993
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View File

@ -18,6 +18,11 @@ buildGoModule rec {
vendorHash = "sha256-IOkbbFtE6+tNKnglE/8ZuNxhPSnloqM2sLgTvagMmnc=";
patches = [
# backport of https://github.com/juanfont/headscale/pull/1697
./trim-oidc-secret-path.patch
];
ldflags = ["-s" "-w" "-X github.com/juanfont/headscale/cmd/headscale/cli.Version=v${version}"];
nativeBuildInputs = [installShellFiles];

View File

@ -0,0 +1,13 @@
diff --git a/hscontrol/config.go b/hscontrol/config.go
index 0e83a1c..71fbfb0 100644
--- a/hscontrol/config.go
+++ b/hscontrol/config.go
@@ -573,7 +573,7 @@ func GetHeadscaleConfig() (*Config, error) {
if err != nil {
return nil, err
}
- oidcClientSecret = string(secretBytes)
+ oidcClientSecret = strings.TrimSpace(string(secretBytes))
}
return &Config{