mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Fix crash when using incorrectly formatted password hash
This commit is contained in:
parent
65a806f5dc
commit
df86245fe8
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user