mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2025-07-08 02:45:08 +00:00
rpc: Only show version string if it matches expected pattern
This commit is contained in:
parent
3293780992
commit
dce6f055f9
6 changed files with 153 additions and 2 deletions
|
@ -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.";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue