From dce6f055f90d076bc7afc0bc97110d049eb036df Mon Sep 17 00:00:00 2001 From: Nathan Dorfman Date: Tue, 12 Nov 2019 15:41:05 -0700 Subject: rpc: Only show version string if it matches expected pattern --- src/daemon/rpc_command_executor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/daemon/rpc_command_executor.cpp') diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp index f4a43d3d6..eb9dfdf1e 100644 --- a/src/daemon/rpc_command_executor.cpp +++ b/src/daemon/rpc_command_executor.cpp @@ -38,6 +38,7 @@ #include "cryptonote_basic/difficulty.h" #include "cryptonote_basic/hardfork.h" #include "rpc/rpc_payment_signature.h" +#include "rpc/rpc_version_str.h" #include #include #include @@ -2465,7 +2466,7 @@ bool t_rpc_command_executor::version() } } - if (res.version.empty()) + if (res.version.empty() || !cryptonote::rpc::is_version_string_valid(res.version)) { tools::fail_msg_writer() << "The daemon software version is not available."; } -- cgit v1.2.3