We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e72459 commit df38b72Copy full SHA for df38b72
crates/config/src/sections/matrix.rs
@@ -130,10 +130,12 @@ impl MatrixConfig {
130
///
131
/// Returns an error when the shared secret could not be read from file.
132
pub async fn secret(&self) -> anyhow::Result<String> {
133
- Ok(match &self.secret {
+ let raw = match &self.secret {
134
Secret::File(path) => tokio::fs::read_to_string(path).await?,
135
Secret::Value(secret) => secret.clone(),
136
- })
+ };
137
+
138
+ Ok(raw.trim().to_string())
139
}
140
141
pub(crate) fn generate<R>(mut rng: R) -> Self
0 commit comments