diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-03-16 19:22:37 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-03-16 19:22:37 +0000 |
commit | ca06104e24bc25835490095e7f17bf65f09d2cc9 (patch) | |
tree | 20e66f5112ece64e5bee4214652082c9d7ac168f | |
parent | Update black to 19.10b0 (#6304) (diff) | |
parent | rstrip slashes from url on appservice (#6306) (diff) | |
download | synapse-ca06104e24bc25835490095e7f17bf65f09d2cc9.tar.xz |
rstrip slashes from url on appservice (#6306)
* commit '42e707c66': rstrip slashes from url on appservice (#6306)
-rw-r--r-- | changelog.d/6306.bugfix | 1 | ||||
-rw-r--r-- | synapse/appservice/__init__.py | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/changelog.d/6306.bugfix b/changelog.d/6306.bugfix new file mode 100644 index 0000000000..c7dcbcdce8 --- /dev/null +++ b/changelog.d/6306.bugfix @@ -0,0 +1 @@ +Appservice requests will no longer contain a double slash prefix when the appservice url provided ends in a slash. diff --git a/synapse/appservice/__init__.py b/synapse/appservice/__init__.py index 65cbff95b9..1b13e84425 100644 --- a/synapse/appservice/__init__.py +++ b/synapse/appservice/__init__.py @@ -94,7 +94,9 @@ class ApplicationService(object): 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 |