mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-23 10:45:48 +00:00
comment out 2c838f6459
due to risk of https://en.wikipedia.org/wiki/Billion_laughs attacks - thanks @torhve
This commit is contained in:
parent
5a578ea4c7
commit
bd77216d06
@ -72,10 +72,10 @@ class ThumbnailResource(BaseMediaResource):
|
|||||||
self._respond_404(request)
|
self._respond_404(request)
|
||||||
return
|
return
|
||||||
|
|
||||||
if media_info["media_type"] == "image/svg+xml":
|
# if media_info["media_type"] == "image/svg+xml":
|
||||||
file_path = self.filepaths.local_media_filepath(media_id)
|
# file_path = self.filepaths.local_media_filepath(media_id)
|
||||||
yield self._respond_with_file(request, media_info["media_type"], file_path)
|
# yield self._respond_with_file(request, media_info["media_type"], file_path)
|
||||||
return
|
# return
|
||||||
|
|
||||||
thumbnail_infos = yield self.store.get_local_media_thumbnails(media_id)
|
thumbnail_infos = yield self.store.get_local_media_thumbnails(media_id)
|
||||||
|
|
||||||
@ -108,10 +108,10 @@ class ThumbnailResource(BaseMediaResource):
|
|||||||
self._respond_404(request)
|
self._respond_404(request)
|
||||||
return
|
return
|
||||||
|
|
||||||
if media_info["media_type"] == "image/svg+xml":
|
# if media_info["media_type"] == "image/svg+xml":
|
||||||
file_path = self.filepaths.local_media_filepath(media_id)
|
# file_path = self.filepaths.local_media_filepath(media_id)
|
||||||
yield self._respond_with_file(request, media_info["media_type"], file_path)
|
# yield self._respond_with_file(request, media_info["media_type"], file_path)
|
||||||
return
|
# return
|
||||||
|
|
||||||
thumbnail_infos = yield self.store.get_local_media_thumbnails(media_id)
|
thumbnail_infos = yield self.store.get_local_media_thumbnails(media_id)
|
||||||
for info in thumbnail_infos:
|
for info in thumbnail_infos:
|
||||||
@ -148,10 +148,10 @@ class ThumbnailResource(BaseMediaResource):
|
|||||||
desired_method, desired_type):
|
desired_method, desired_type):
|
||||||
media_info = yield self._get_remote_media(server_name, media_id)
|
media_info = yield self._get_remote_media(server_name, media_id)
|
||||||
|
|
||||||
if media_info["media_type"] == "image/svg+xml":
|
# if media_info["media_type"] == "image/svg+xml":
|
||||||
file_path = self.filepaths.remote_media_filepath(server_name, media_id)
|
# file_path = self.filepaths.remote_media_filepath(server_name, media_id)
|
||||||
yield self._respond_with_file(request, media_info["media_type"], file_path)
|
# yield self._respond_with_file(request, media_info["media_type"], file_path)
|
||||||
return
|
# return
|
||||||
|
|
||||||
thumbnail_infos = yield self.store.get_remote_media_thumbnails(
|
thumbnail_infos = yield self.store.get_remote_media_thumbnails(
|
||||||
server_name, media_id,
|
server_name, media_id,
|
||||||
@ -196,10 +196,10 @@ class ThumbnailResource(BaseMediaResource):
|
|||||||
# We should proxy the thumbnail from the remote server instead.
|
# We should proxy the thumbnail from the remote server instead.
|
||||||
media_info = yield self._get_remote_media(server_name, media_id)
|
media_info = yield self._get_remote_media(server_name, media_id)
|
||||||
|
|
||||||
if media_info["media_type"] == "image/svg+xml":
|
# if media_info["media_type"] == "image/svg+xml":
|
||||||
file_path = self.filepaths.remote_media_filepath(server_name, media_id)
|
# file_path = self.filepaths.remote_media_filepath(server_name, media_id)
|
||||||
yield self._respond_with_file(request, media_info["media_type"], file_path)
|
# yield self._respond_with_file(request, media_info["media_type"], file_path)
|
||||||
return
|
# return
|
||||||
|
|
||||||
thumbnail_infos = yield self.store.get_remote_media_thumbnails(
|
thumbnail_infos = yield self.store.get_remote_media_thumbnails(
|
||||||
server_name, media_id,
|
server_name, media_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user