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.
matrix.secret_file
2 parents f111c09 + 823c60f commit 156c23bCopy full SHA for 156c23b
crates/config/src/sections/matrix.rs
@@ -131,7 +131,11 @@ impl MatrixConfig {
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 {
134
- Secret::File(path) => tokio::fs::read_to_string(path).await?,
+ Secret::File(path) => {
135
+ let raw = tokio::fs::read_to_string(path).await?;
136
+ // Trim the secret when read from file to match Synapse's behaviour
137
+ raw.trim().to_string()
138
+ }
139
Secret::Value(secret) => secret.clone(),
140
})
141
}
0 commit comments