diff options
author | Nathan Dorfman <ndorf@rtfm.net> | 2019-11-12 15:41:05 -0700 |
---|---|---|
committer | Nathan Dorfman <ndorf@rtfm.net> | 2019-11-12 18:19:24 -0700 |
commit | dce6f055f90d076bc7afc0bc97110d049eb036df (patch) | |
tree | 0928bd9e13cdd060828e79e3d3a672565be86368 /src/daemon/rpc_command_executor.cpp | |
parent | daemon: Use rpc for "version" command (diff) | |
download | monero-dce6f055f90d076bc7afc0bc97110d049eb036df.tar.xz |
rpc: Only show version string if it matches expected pattern
Diffstat (limited to '')
-rw-r--r-- | src/daemon/rpc_command_executor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 <boost/format.hpp> #include <ctime> #include <string> @@ -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."; } |