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

Commit

Permalink
Fix a long-standing spec compliance bug where Synapse would accept a …
Browse files Browse the repository at this point in the history
…trailing slash on the end of `/get_missing_events` federation requests. (#13789)

* Don't accept a trailing slash on the end of /get_missing_events

* Newsfile

Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>

Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
  • Loading branch information
reivilibre authored Sep 14, 2022
1 parent 12dacec commit 21687ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/13789.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a long-standing spec compliance bug where Synapse would accept a trailing slash on the end of `/get_missing_events` federation requests.
3 changes: 1 addition & 2 deletions synapse/federation/transport/server/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,7 @@ async def on_POST(


class FederationGetMissingEventsServlet(BaseFederationServerServlet):
# TODO(paul): Why does this path alone end with "/?" optional?
PATH = "/get_missing_events/(?P<room_id>[^/]*)/?"
PATH = "/get_missing_events/(?P<room_id>[^/]*)"

async def on_POST(
self,
Expand Down

0 comments on commit 21687ec

Please sign in to comment.