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

Disable directory listing for StaticResource #15438

Merged
merged 6 commits into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/15438.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Disable directory listing for static resources in `/_matrix/static/`.
3 changes: 3 additions & 0 deletions synapse/http/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,9 @@ def render_GET(self, request: Request) -> bytes:
set_clickjacking_protection_headers(request)
return super().render_GET(request)

def directoryListing(self) -> resource.NoResource:
return self.childNotFound
clokep marked this conversation as resolved.
Show resolved Hide resolved


class UnrecognizedRequestResource(resource.Resource):
"""
Expand Down