diff options
Diffstat (limited to 'src/httprpc.cpp')
-rw-r--r-- | src/httprpc.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/httprpc.cpp b/src/httprpc.cpp index f3b2619dbd..cb8b220895 100644 --- a/src/httprpc.cpp +++ b/src/httprpc.cpp @@ -253,11 +253,14 @@ static bool InitRPCAuthentication() if (gArgs.GetArg("-rpcauth","") != "") { LogPrintf("Using rpcauth authentication.\n"); - for (std::string rpcauth : gArgs.GetArgs("-rpcauth")) { + for (const std::string& rpcauth : gArgs.GetArgs("-rpcauth")) { std::vector<std::string> fields; boost::split(fields, rpcauth, boost::is_any_of(":$")); if (fields.size() == 3) { g_rpcauth.push_back(fields); + } else { + LogPrintf("Invalid -rpcauth argument.\n"); + return false; } } } |