Codebase list matrix-synapse / 8a2db9e
New upstream version 1.20.1 Andrej Shadura 3 years ago
7 changed file(s) with 29 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
Binary diff not shown
0 Synapse 1.20.1 (2020-09-24)
1 ===========================
2
3 Bugfixes
4 --------
5
6 - Fix a bug introduced in v1.20.0 which caused the `synapse_port_db` script to fail. ([\#8386](https://github.com/matrix-org/synapse/issues/8386))
7 - Fix a bug introduced in v1.20.0 which caused variables to be incorrectly escaped in Jinja2 templates. ([\#8394](https://github.com/matrix-org/synapse/issues/8394))
8
9
010 Synapse 1.20.0 (2020-09-22)
111 ===========================
212
0 matrix-synapse-py3 (1.20.1) stable; urgency=medium
1
2 * New synapse release 1.20.1.
3
4 -- Synapse Packaging team <packages@matrix.org> Thu, 24 Sep 2020 16:25:22 +0100
5
06 matrix-synapse-py3 (1.20.0) stable; urgency=medium
17
28 [ Synapse Packaging team ]
8888 "redactions": ["have_censored"],
8989 "room_stats_state": ["is_federatable"],
9090 "local_media_repository": ["safe_from_quarantine"],
91 "users": ["shadow_banned"],
9192 }
9293
9394
4747 except ImportError:
4848 pass
4949
50 __version__ = "1.20.0"
50 __version__ = "1.20.1"
5151
5252 if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
5353 # We import here so that we don't have to install a bunch of deps when
193193 return file_stream.read()
194194
195195 def read_templates(
196 self, filenames: List[str], custom_template_directory: Optional[str] = None,
196 self,
197 filenames: List[str],
198 custom_template_directory: Optional[str] = None,
199 autoescape: bool = False,
197200 ) -> List[jinja2.Template]:
198201 """Load a list of template files from disk using the given variables.
199202
208211
209212 custom_template_directory: A directory to try to look for the templates
210213 before using the default Synapse template directory instead.
214
215 autoescape: Whether to autoescape variables before inserting them into the
216 template.
211217
212218 Raises:
213219 ConfigError: if the file's path is incorrect or otherwise cannot be read.
232238 search_directories.insert(0, custom_template_directory)
233239
234240 loader = jinja2.FileSystemLoader(search_directories)
235 env = jinja2.Environment(loader=loader, autoescape=True)
241 env = jinja2.Environment(loader=loader, autoescape=autoescape)
236242
237243 # Update the environment with our custom filters
238244 env.filters.update(
168168 saml2_config.get("saml_session_lifetime", "15m")
169169 )
170170
171 # We enable autoescape here as the message may potentially come from a
172 # remote resource
171173 self.saml2_error_html_template = self.read_templates(
172 ["saml_error.html"], saml2_config.get("template_dir")
174 ["saml_error.html"], saml2_config.get("template_dir"), autoescape=True
173175 )[0]
174176
175177 def _default_saml_config_dict(