]> granicus.if.org Git - icinga2/commitdiff
Fix crash when using incorrectly formatted password hash
authorJean Flach <jean-marcel.flach@icinga.com>
Fri, 22 Dec 2017 11:58:39 +0000 (12:58 +0100)
committerGunnar Beutner <gunnar.beutner@icinga.com>
Thu, 15 Feb 2018 12:09:22 +0000 (13:09 +0100)
lib/remote/httpserverconnection.cpp

index 8962258e32f4bda2086fbfb463c56d66034ac7e4..52fa5a703a31b152209794be9bbc0b0af5fb6355 100644 (file)
@@ -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();
                }
        }