From 7afc92e8973e8cc60bd77d1b89138ff87ebaeeec Mon Sep 17 00:00:00 2001 From: OMsai <97650182+omsai11@users.noreply.github.com> Date: Mon, 18 Sep 2023 23:53:32 +0530 Subject: [PATCH] Update auth.py tried to solve the issue no #15871 500 error when auth is null for a UIA request #15871 --- synapse/handlers/auth.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index 2b0c50513095..2cf2a4665eb5 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -481,8 +481,9 @@ async def check_ui_auth( sid: Optional[str] = None authdict = clientdict.pop("auth", {}) - if "session" in authdict: - sid = authdict["session"] + if authdict is not None: + if "session" in authdict: + sid = authdict["session"] # Convert the URI and method to strings. uri = request.uri.decode("utf-8")