Merge branch 'master' into develop
This commit is contained in:
commit
c77c4a2fcd
10
CHANGES.md
10
CHANGES.md
|
@ -1,3 +1,13 @@
|
||||||
|
Synapse 1.20.1 (2020-09-24)
|
||||||
|
===========================
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- 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))
|
||||||
|
- 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))
|
||||||
|
|
||||||
|
|
||||||
Synapse 1.20.0 (2020-09-22)
|
Synapse 1.20.0 (2020-09-22)
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
matrix-synapse-py3 (1.20.1) stable; urgency=medium
|
||||||
|
|
||||||
|
* New synapse release 1.20.1.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Thu, 24 Sep 2020 16:25:22 +0100
|
||||||
|
|
||||||
matrix-synapse-py3 (1.20.0) stable; urgency=medium
|
matrix-synapse-py3 (1.20.0) stable; urgency=medium
|
||||||
|
|
||||||
[ Synapse Packaging team ]
|
[ Synapse Packaging team ]
|
||||||
|
|
|
@ -48,7 +48,7 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
__version__ = "1.20.0"
|
__version__ = "1.20.1"
|
||||||
|
|
||||||
if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
|
if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
|
||||||
# We import here so that we don't have to install a bunch of deps when
|
# We import here so that we don't have to install a bunch of deps when
|
||||||
|
|
|
@ -194,7 +194,10 @@ class Config:
|
||||||
return file_stream.read()
|
return file_stream.read()
|
||||||
|
|
||||||
def read_templates(
|
def read_templates(
|
||||||
self, filenames: List[str], custom_template_directory: Optional[str] = None,
|
self,
|
||||||
|
filenames: List[str],
|
||||||
|
custom_template_directory: Optional[str] = None,
|
||||||
|
autoescape: bool = False,
|
||||||
) -> List[jinja2.Template]:
|
) -> List[jinja2.Template]:
|
||||||
"""Load a list of template files from disk using the given variables.
|
"""Load a list of template files from disk using the given variables.
|
||||||
|
|
||||||
|
@ -210,6 +213,9 @@ class Config:
|
||||||
custom_template_directory: A directory to try to look for the templates
|
custom_template_directory: A directory to try to look for the templates
|
||||||
before using the default Synapse template directory instead.
|
before using the default Synapse template directory instead.
|
||||||
|
|
||||||
|
autoescape: Whether to autoescape variables before inserting them into the
|
||||||
|
template.
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
ConfigError: if the file's path is incorrect or otherwise cannot be read.
|
ConfigError: if the file's path is incorrect or otherwise cannot be read.
|
||||||
|
|
||||||
|
@ -233,7 +239,7 @@ class Config:
|
||||||
search_directories.insert(0, custom_template_directory)
|
search_directories.insert(0, custom_template_directory)
|
||||||
|
|
||||||
loader = jinja2.FileSystemLoader(search_directories)
|
loader = jinja2.FileSystemLoader(search_directories)
|
||||||
env = jinja2.Environment(loader=loader, autoescape=True)
|
env = jinja2.Environment(loader=loader, autoescape=autoescape)
|
||||||
|
|
||||||
# Update the environment with our custom filters
|
# Update the environment with our custom filters
|
||||||
env.filters.update(
|
env.filters.update(
|
||||||
|
|
Loading…
Reference in New Issue