New upstream version 1.20.1
Andrej Shadura
3 years ago
|
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 |
|
0 | 10 |
Synapse 1.20.0 (2020-09-22)
|
1 | 11 |
===========================
|
2 | 12 |
|
|
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 |
|
0 | 6 |
matrix-synapse-py3 (1.20.0) stable; urgency=medium
|
1 | 7 |
|
2 | 8 |
[ Synapse Packaging team ]
|
88 | 88 |
"redactions": ["have_censored"],
|
89 | 89 |
"room_stats_state": ["is_federatable"],
|
90 | 90 |
"local_media_repository": ["safe_from_quarantine"],
|
|
91 |
"users": ["shadow_banned"],
|
91 | 92 |
}
|
92 | 93 |
|
93 | 94 |
|
47 | 47 |
except ImportError:
|
48 | 48 |
pass
|
49 | 49 |
|
50 | |
__version__ = "1.20.0"
|
|
50 |
__version__ = "1.20.1"
|
51 | 51 |
|
52 | 52 |
if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
|
53 | 53 |
# We import here so that we don't have to install a bunch of deps when
|
193 | 193 |
return file_stream.read()
|
194 | 194 |
|
195 | 195 |
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,
|
197 | 200 |
) -> List[jinja2.Template]:
|
198 | 201 |
"""Load a list of template files from disk using the given variables.
|
199 | 202 |
|
|
208 | 211 |
|
209 | 212 |
custom_template_directory: A directory to try to look for the templates
|
210 | 213 |
before using the default Synapse template directory instead.
|
|
214 |
|
|
215 |
autoescape: Whether to autoescape variables before inserting them into the
|
|
216 |
template.
|
211 | 217 |
|
212 | 218 |
Raises:
|
213 | 219 |
ConfigError: if the file's path is incorrect or otherwise cannot be read.
|
|
232 | 238 |
search_directories.insert(0, custom_template_directory)
|
233 | 239 |
|
234 | 240 |
loader = jinja2.FileSystemLoader(search_directories)
|
235 | |
env = jinja2.Environment(loader=loader, autoescape=True)
|
|
241 |
env = jinja2.Environment(loader=loader, autoescape=autoescape)
|
236 | 242 |
|
237 | 243 |
# Update the environment with our custom filters
|
238 | 244 |
env.filters.update(
|
168 | 168 |
saml2_config.get("saml_session_lifetime", "15m")
|
169 | 169 |
)
|
170 | 170 |
|
|
171 |
# We enable autoescape here as the message may potentially come from a
|
|
172 |
# remote resource
|
171 | 173 |
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
|
173 | 175 |
)[0]
|
174 | 176 |
|
175 | 177 |
def _default_saml_config_dict(
|