diff options
author | luigi1111 <luigi1111w@gmail.com> | 2021-09-09 15:14:17 -0400 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2021-09-09 15:14:17 -0400 |
commit | dfa6b58d4db35bd58027093517b188953dd247dc (patch) | |
tree | 6f696c4d4bac524e94bfeabea5b7ccb9d1a91b67 /src/wallet/wallet_rpc_server.cpp | |
parent | Merge pull request #7773 from selsta/unbound (diff) | |
parent | monero-wallet-rpc: Prevent --password-file from being used with --wallet-dir (diff) | |
download | monero-dfa6b58d4db35bd58027093517b188953dd247dc.tar.xz |
Merge pull request #7823
24d3d65 monero-wallet-rpc: Prevent --password-file from being used with --wallet-dir (Kermit Alexander II)
Diffstat (limited to 'src/wallet/wallet_rpc_server.cpp')
-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 e1a06886b..0083dfbe7 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -4525,10 +4525,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; @@ -4538,6 +4540,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; |