mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
wallet: Use boost to more portably ensure -wallet specifies only a filename
This commit is contained in:
parent
d678771c66
commit
a4186dd239
1 changed files with 1 additions and 1 deletions
|
|
@ -3765,7 +3765,7 @@ bool CWallet::InitLoadWallet()
|
|||
|
||||
std::string walletFile = GetArg("-wallet", DEFAULT_WALLET_DAT);
|
||||
|
||||
if (walletFile.find_first_of("/\\") != std::string::npos) {
|
||||
if (boost::filesystem::path(walletFile).filename() != walletFile) {
|
||||
return InitError(_("-wallet parameter must only specify a filename (not a path)"));
|
||||
} else if (SanitizeString(walletFile, SAFE_CHARS_FILENAME) != walletFile) {
|
||||
return InitError(_("Invalid characters in -wallet filename"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue