From 504c8f3483f3d213b82fa5a81d9cc122f0b465d7 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Mon, 13 Jul 2020 17:14:42 +0100 Subject: Fix handling of "off" in encryption_enabled_by_default_for_room_type (#7822) Fixes https://github.com/matrix-org/synapse/issues/7821, introduced in https://github.com/matrix-org/synapse/pull/7639 Turns out PyYAML translates `off` into a `False` boolean if it's unquoted (see https://stackoverflow.com/questions/36463531/pyyaml-automatically-converting-certain-keys-to-boolean-values), which seems to be a liberal interpretation of this bit of the YAML spec: https://yaml.org/spec/1.1/current.html#id864510 An alternative fix would be to implement the solution mentioned in the SO post linked above, but I'm aware it might break existing setups (which might use these values in the configuration file) so it's probably better just to add an extra check for this one. We should be aware that this is a thing for the next times we do that though. I didn't find any other occurrence of this bug elsewhere in the codebase. --- changelog.d/7822.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/7822.bugfix (limited to 'changelog.d') diff --git a/changelog.d/7822.bugfix b/changelog.d/7822.bugfix new file mode 100644 index 0000000000..faf249a678 --- /dev/null +++ b/changelog.d/7822.bugfix @@ -0,0 +1 @@ +Fix a bug causing Synapse to misinterpret the value `off` for `encryption_enabled_by_default_for_room_type` in its configuration file(s) if that value isn't surrounded by quotes. This bug was introduced in v1.16.0. -- cgit 1.4.1