Merge pull request #86 from cogutvalera/issue_1171

Safer way to handle unlock command of cli_wallet #1171
This commit is contained in:
Peter Conrad 2018-11-01 14:57:42 +01:00 committed by GitHub
commit 9fa03c6786
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -210,7 +210,7 @@ static int cli_completion(char *token, char ***array)
*/
static int cli_check_secret(const char *source)
{
if (boost::regex_match(source, cli_regex_secret()))
if (!cli_regex_secret().empty() && boost::regex_match(source, cli_regex_secret()))
return 1;
return 0;