Fix bug where malformed requests cause Db locks that are never unlocked.

This commit is contained in:
Jordan Bancino 2023-01-09 19:16:12 +00:00
parent a7ab3e757a
commit 1421c478fd

View file

@ -125,6 +125,7 @@ UserInteractiveAuth(HttpServerContext * context, Db * db,
/* Check to see if session exists */
if (!ref || !HashMapGet(DbJson(ref), sessionStr))
{
DbUnlock(db, ref);
HttpResponseStatus(context, HTTP_BAD_REQUEST);
return MatrixErrorCreate(M_UNKNOWN);
}