Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit c77c4a2

Browse files
committed
Merge branch 'master' into develop
2 parents f112cfe + ab903e7 commit c77c4a2

File tree

4 files changed

+25
-3
lines changed

4 files changed

+25
-3
lines changed

CHANGES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
Synapse 1.20.1 (2020-09-24)
2+
===========================
3+
4+
Bugfixes
5+
--------
6+
7+
- 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))
8+
- 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))
9+
10+
111
Synapse 1.20.0 (2020-09-22)
212
===========================
313

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
matrix-synapse-py3 (1.20.1) stable; urgency=medium
2+
3+
* New synapse release 1.20.1.
4+
5+
-- Synapse Packaging team <[email protected]> Thu, 24 Sep 2020 16:25:22 +0100
6+
17
matrix-synapse-py3 (1.20.0) stable; urgency=medium
28

39
[ Synapse Packaging team ]

synapse/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
except ImportError:
4949
pass
5050

51-
__version__ = "1.20.0"
51+
__version__ = "1.20.1"
5252

5353
if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
5454
# We import here so that we don't have to install a bunch of deps when

synapse/config/_base.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,10 @@ def read_file(cls, file_path, config_name):
194194
return file_stream.read()
195195

196196
def read_templates(
197-
self, filenames: List[str], custom_template_directory: Optional[str] = None,
197+
self,
198+
filenames: List[str],
199+
custom_template_directory: Optional[str] = None,
200+
autoescape: bool = False,
198201
) -> List[jinja2.Template]:
199202
"""Load a list of template files from disk using the given variables.
200203
@@ -210,6 +213,9 @@ def read_templates(
210213
custom_template_directory: A directory to try to look for the templates
211214
before using the default Synapse template directory instead.
212215
216+
autoescape: Whether to autoescape variables before inserting them into the
217+
template.
218+
213219
Raises:
214220
ConfigError: if the file's path is incorrect or otherwise cannot be read.
215221
@@ -233,7 +239,7 @@ def read_templates(
233239
search_directories.insert(0, custom_template_directory)
234240

235241
loader = jinja2.FileSystemLoader(search_directories)
236-
env = jinja2.Environment(loader=loader, autoescape=True)
242+
env = jinja2.Environment(loader=loader, autoescape=autoescape)
237243

238244
# Update the environment with our custom filters
239245
env.filters.update(

0 commit comments

Comments
 (0)