diff options
| author | Luke Hoersten <[email protected]> | 2026-07-30 18:19:08 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2026-07-30 18:19:08 -0500 |
| commit | 00e966edfe45e594e8491bda3a235b7a7964f759 (patch) | |
| tree | 82bd2460b45b2b7dfa6689192f2400a849928b6d /dendrite/server | |
| parent | 006ecfb2c80aeeb609c28534828bbcb5cff3333e (diff) | |
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.
Diffstat (limited to 'dendrite/server')
| -rw-r--r-- | dendrite/server/templates/dendrite.yaml.j2 | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
