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 6a0ab03Copy full SHA for 6a0ab03
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 behavior
137
+ raw.trim().to_string()
138
+ }
139
Secret::Value(secret) => secret.clone(),
140
})
141
}
0 commit comments