diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2019-02-11 21:04:27 +1100 |
---|---|---|
committer | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-02-11 10:04:27 +0000 |
commit | 4ffd10f46d62f7bc5430d148260e3240b7a0598b (patch) | |
tree | 141d399796f09e148d6d96a66a57ce9348c6c3c5 | |
parent | Merge pull request #4420 from matrix-org/jaywink/openid-listener (diff) | |
download | synapse-4ffd10f46d62f7bc5430d148260e3240b7a0598b.tar.xz |
Be tolerant of blank TLS fingerprints config (#4589)
-rw-r--r-- | changelog.d/4589.bugfix | 1 | ||||
-rw-r--r-- | synapse/config/tls.py | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/changelog.d/4589.bugfix b/changelog.d/4589.bugfix new file mode 100644 index 0000000000..d5783f46e8 --- /dev/null +++ b/changelog.d/4589.bugfix @@ -0,0 +1 @@ +Synapse is now tolerant of the tls_fingerprints option being None or not specified. diff --git a/synapse/config/tls.py b/synapse/config/tls.py index b5f2cfd9b7..81b3a659fe 100644 --- a/synapse/config/tls.py +++ b/synapse/config/tls.py @@ -45,7 +45,11 @@ class TlsConfig(Config): self.tls_certificate_file = self.abspath(config.get("tls_certificate_path")) self.tls_private_key_file = self.abspath(config.get("tls_private_key_path")) - self._original_tls_fingerprints = config["tls_fingerprints"] + self._original_tls_fingerprints = config.get("tls_fingerprints", []) + + if self._original_tls_fingerprints is None: + self._original_tls_fingerprints = [] + self.tls_fingerprints = list(self._original_tls_fingerprints) self.no_tls = config.get("no_tls", False) |