forked from Telodendria/Telodendria
Fix bug where malformed requests cause Db locks that are never unlocked.
This commit is contained in:
parent
a7ab3e757a
commit
1421c478fd
1 changed files with 1 additions and 0 deletions
|
@ -125,6 +125,7 @@ UserInteractiveAuth(HttpServerContext * context, Db * db,
|
||||||
/* Check to see if session exists */
|
/* Check to see if session exists */
|
||||||
if (!ref || !HashMapGet(DbJson(ref), sessionStr))
|
if (!ref || !HashMapGet(DbJson(ref), sessionStr))
|
||||||
{
|
{
|
||||||
|
DbUnlock(db, ref);
|
||||||
HttpResponseStatus(context, HTTP_BAD_REQUEST);
|
HttpResponseStatus(context, HTTP_BAD_REQUEST);
|
||||||
return MatrixErrorCreate(M_UNKNOWN);
|
return MatrixErrorCreate(M_UNKNOWN);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue