From 00e966edfe45e594e8491bda3a235b7a7964f759 Mon Sep 17 00:00:00 2001 From: Luke Hoersten Date: Thu, 30 Jul 2026 18:19:08 -0500 Subject: dendrite, relayer: percent-encode db passwords in connection urls Passwords containing '/' are invalid unencoded in a url authority and break Go's url.Parse (invalid port after host). Latent until a restart forced a config re-read. jinja urlencode leaves '/' unescaped, hence the extra replace. --- dendrite/server/templates/dendrite.yaml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dendrite/server/templates') diff --git a/dendrite/server/templates/dendrite.yaml.j2 b/dendrite/server/templates/dendrite.yaml.j2 index 0fe6aa2..7fc159d 100644 --- a/dendrite/server/templates/dendrite.yaml.j2 +++ b/dendrite/server/templates/dendrite.yaml.j2 @@ -37,7 +37,7 @@ global: # sections. For monolith deployments using SQLite databases, # you must configure the "database" block for each component instead. database: - connection_string: postgresql://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}?sslmode=disable + connection_string: postgresql://{{dendrite_db_user}}:{{dendrite_db_pass | urlencode | replace("/", "%2F")}}@localhost/{{dendrite_db}}?sslmode=disable max_open_conns: 25 max_idle_conns: 5 conn_max_lifetime: -1 -- cgit v1.2.3