fix: Trim whitespace from OIDC client secret file

This commit is contained in:
Ginger authored and Ellis Git committed 2026-07-12 02:06:48 +00:00
1 parent 6858e1b893
commit 556141b404
2 files changed
+2

No files matched your search

+1
View File
@@ -0,0 +1 @@
Whitespace will now automatically be trimmed from the start and end of the `global.oauth.oidc.client_secret_file`.
+1
View File
@@ -151,6 +151,7 @@ impl crate::Service for Service {
config: config.clone(),
client_secret: if let Some(client_secret_file) = &config.client_secret_file {
std::fs::read_to_string(client_secret_file)
.map(|client_secret| client_secret.trim().to_owned())
.map(ClientSecret::new)
.map_err(|err| err!("Failed to read OIDC client secret file: {err}"))?
} else if let Some(client_secret) = &config.client_secret {