We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bfa7d8 commit 100d67cCopy full SHA for 100d67c
src/wallet/wallet.cpp
@@ -4351,6 +4351,12 @@ bool CWallet::InitLoadWallet()
4351
4352
std::string walletFile = gArgs.GetArg("-wallet", DEFAULT_WALLET_DAT);
4353
4354
+ if (walletFile.find_first_of("/\\") != std::string::npos) {
4355
+ return UIError(_("-wallet parameter must only specify a filename (not a path)"));
4356
+ } else if (SanitizeString(walletFile, SAFE_CHARS_FILENAME) != walletFile) {
4357
+ return UIError(_("Invalid characters in -wallet filename"));
4358
+ }
4359
+
4360
CWallet * const pwallet = CreateWalletFromFile(walletFile);
4361
if (!pwallet) {
4362
return false;
0 commit comments