1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/handlers/identity.py b/synapse/handlers/identity.py
index efc68cb9b4..c5ff072d5a 100644
--- a/synapse/handlers/identity.py
+++ b/synapse/handlers/identity.py
@@ -1034,6 +1034,9 @@ class IdentityHandler(BaseHandler):
"""
# Extract the domain name from the IS URL as we store IS domains instead of URLs
id_server = urllib.parse.urlparse(id_server_url).hostname
+ if not id_server:
+ # We were unable to determine the hostname, bail out
+ return
# id_server_url is assumed to have no trailing slashes
url = id_server_url + "/_matrix/identity/internal/bind"
|