From df86245fe8755877a6634f43c2ea55bd14d221c1 Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Fri, 22 Dec 2017 12:58:39 +0100 Subject: [PATCH] Fix crash when using incorrectly formatted password hash --- lib/remote/httpserverconnection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/remote/httpserverconnection.cpp b/lib/remote/httpserverconnection.cpp index 8962258e3..52fa5a703 100644 --- a/lib/remote/httpserverconnection.cpp +++ b/lib/remote/httpserverconnection.cpp @@ -162,7 +162,7 @@ void HttpServerConnection::ProcessMessageAsync(HttpRequest& request) user.reset(); else { Dictionary::Ptr passwordDict = user->GetPasswordDict(); - if (!ComparePassword(passwordDict->Get("password"), password, passwordDict->Get("salt"))) + if (!passwordDict || !ComparePassword(passwordDict->Get("password"), password, passwordDict->Get("salt"))) user.reset(); } }