From b49197f8088fa594e4e9a1794f3f189b1d782b47 Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Tue, 27 Feb 2024 23:39:23 +0100 Subject: [PATCH] Stratum: better check of the login response --- src/base/net/stratum/Client.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/base/net/stratum/Client.cpp b/src/base/net/stratum/Client.cpp index 50e35bcc..68122f93 100644 --- a/src/base/net/stratum/Client.cpp +++ b/src/base/net/stratum/Client.cpp @@ -609,6 +609,11 @@ bool xmrig::Client::parseLogin(const rapidjson::Value &result, int *code) parseExtensions(result); + if (!result.HasMember("job")) { + *code = 2; + return false; + } + const bool rc = parseJob(result["job"], code); m_jobs = 0;