mirror of
https://github.com/wownero/wownero.git
synced 2026-10-17 07:31:35 +02:00
wallet_rpc_server: reject --password with --wallet-dir
(cherry picked from commit 587315ce94c8c3f656ce3bbb5e046e4aa96942d4)
This commit is contained in:
@@ -1300,6 +1300,11 @@ bool wallet2::has_stagenet_option(const boost::program_options::variables_map& v
|
||||
return command_line::get_arg(vm, options().stagenet);
|
||||
}
|
||||
|
||||
bool wallet2::has_password_option(const boost::program_options::variables_map& vm)
|
||||
{
|
||||
return command_line::has_arg(vm, options().password);
|
||||
}
|
||||
|
||||
bool wallet2::has_proxy_option() const
|
||||
{
|
||||
return !m_proxy.empty();
|
||||
|
||||
@@ -280,6 +280,7 @@ private:
|
||||
|
||||
static bool has_testnet_option(const boost::program_options::variables_map& vm);
|
||||
static bool has_stagenet_option(const boost::program_options::variables_map& vm);
|
||||
static bool has_password_option(const boost::program_options::variables_map& vm);
|
||||
static std::string device_name_option(const boost::program_options::variables_map& vm);
|
||||
static std::string device_derivation_path_option(const boost::program_options::variables_map &vm);
|
||||
static void init_options(boost::program_options::options_description& desc_params);
|
||||
|
||||
@@ -4919,6 +4919,12 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!wallet_dir.empty() && tools::wallet2::has_password_option(vm))
|
||||
{
|
||||
LOG_ERROR(tools::wallet_rpc_server::tr("--password is not allowed in combination with --wallet-dir"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!wallet_dir.empty())
|
||||
{
|
||||
wal = NULL;
|
||||
|
||||
Reference in New Issue
Block a user