matrix_bridge: Verify server URL scheme.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
3e2f839946
commit
751b4716c8
1 changed files with 2 additions and 0 deletions
|
@ -232,6 +232,8 @@ class ZulipToMatrix:
|
|||
if result["result"] != "success":
|
||||
raise BridgeFatalZulipError("cannot get server settings")
|
||||
self.server_url: str = result["realm_uri"]
|
||||
if not self.server_url.startswith(("http:", "https:")):
|
||||
raise ValueError("Unexpected server URL scheme")
|
||||
|
||||
@classmethod
|
||||
async def create(
|
||||
|
|
Loading…
Add table
Reference in a new issue