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

Commit

Permalink
rstrip slashes from url on appservice (#6306)
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot authored and anoadragon453 committed Oct 31, 2019
1 parent 020add5 commit 42e707c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/6306.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Appservice requests will no longer contain a double slash prefix when the appservice url provided ends in a slash.
4 changes: 3 additions & 1 deletion synapse/appservice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ def __init__(
ip_range_whitelist=None,
):
self.token = token
self.url = url
self.url = (
url.rstrip("/") if isinstance(url, str) else None
) # url must not end with a slash
self.hs_token = hs_token
self.sender = sender
self.server_name = hostname
Expand Down

0 comments on commit 42e707c

Please sign in to comment.