diff options
author | Kermit Alexander II <kermitalexandr@google.com> | 2021-07-31 04:23:03 -0500 |
---|---|---|
committer | Kermit Alexander II <kermitalexandr@google.com> | 2021-08-20 08:54:41 -0500 |
commit | 24d3d65d42a6e95dc37605bbe779a5f2ef096492 (patch) | |
tree | 11142920ea27889c728e0a44055fa1da4b0d8904 /src/wallet/wallet_rpc_server.cpp | |
parent | Merge pull request #7814 (diff) | |
download | monero-24d3d65d42a6e95dc37605bbe779a5f2ef096492.tar.xz |
monero-wallet-rpc: Prevent --password-file from being used with --wallet-dir
Diffstat (limited to '')
-rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index b72817ba0..249a8ffa2 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -4502,10 +4502,12 @@ public: const auto arg_wallet_file = wallet_args::arg_wallet_file(); const auto arg_from_json = wallet_args::arg_generate_from_json(); const auto arg_rpc_client_secret_key = wallet_args::arg_rpc_client_secret_key(); + const auto arg_password_file = wallet_args::arg_password_file(); const auto wallet_file = command_line::get_arg(vm, arg_wallet_file); const auto from_json = command_line::get_arg(vm, arg_from_json); const auto wallet_dir = command_line::get_arg(vm, arg_wallet_dir); + const auto password_file = command_line::get_arg(vm, arg_password_file); const auto prompt_for_password = command_line::get_arg(vm, arg_prompt_for_password); const auto password_prompt = prompt_for_password ? password_prompter : nullptr; @@ -4515,6 +4517,12 @@ public: return false; } + if(!wallet_dir.empty() && !password_file.empty()) + { + LOG_ERROR(tools::wallet_rpc_server::tr("--password-file is not allowed in combination with --wallet-dir")); + return false; + } + if (!wallet_dir.empty()) { wal = NULL; |