From 4a47ad66385c177f2ac4d41a6c825341b1f2f573 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 30 Oct 2024 09:59:28 -0600 Subject: [PATCH] Enable authenticated media by default --- docs/usage/configuration/config_documentation.md | 5 ++--- synapse/config/repository.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/usage/configuration/config_documentation.md b/docs/usage/configuration/config_documentation.md index 47e3ef12870..79bb3384e90 100644 --- a/docs/usage/configuration/config_documentation.md +++ b/docs/usage/configuration/config_documentation.md @@ -1887,12 +1887,11 @@ Config options related to Synapse's media store. When set to true, all subsequent media uploads will be marked as authenticated, and will not be available over legacy unauthenticated media endpoints (`/_matrix/media/(r0|v3|v1)/download` and `/_matrix/media/(r0|v3|v1)/thumbnail`) - requests for authenticated media over these endpoints will result in a 404. All media, including authenticated media, will be available over the authenticated media endpoints `_matrix/client/v1/media/download` and `_matrix/client/v1/media/thumbnail`. Media uploaded prior to setting this option to true will still be available over the legacy endpoints. Note if the setting is switched to false -after enabling, media marked as authenticated will be available over legacy endpoints. Defaults to false, but -this will change to true in a future Synapse release. +after enabling, media marked as authenticated will be available over legacy endpoints. Defaults to true (previously false). Example configuration: ```yaml -enable_authenticated_media: true +enable_authenticated_media: false ``` --- ### `enable_media_repo` diff --git a/synapse/config/repository.py b/synapse/config/repository.py index 97ce6de5281..e07c52d75a0 100644 --- a/synapse/config/repository.py +++ b/synapse/config/repository.py @@ -273,7 +273,7 @@ def read_config(self, config: JsonDict, **kwargs: Any) -> None: ) self.enable_authenticated_media = config.get( - "enable_authenticated_media", False + "enable_authenticated_media", True ) def generate_config_section(self, data_dir_path: str, **kwargs: Any) -> str: