From 8cff83124bcac936ecc6add6dca72b125a79a08f Mon Sep 17 00:00:00 2001 From: MeshCollider Date: Thu, 3 Jan 2019 23:54:19 +1300 Subject: Error if rpcpassword contains hash in conf sections --- src/util/system.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util/system.cpp') diff --git a/src/util/system.cpp b/src/util/system.cpp index 8e201ec59..ffe4d21ee 100644 --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -865,7 +865,7 @@ static bool GetConfigOptions(std::istream& stream, std::string& error, std::vect } else if ((pos = str.find('=')) != std::string::npos) { std::string name = prefix + TrimString(str.substr(0, pos), pattern); std::string value = TrimString(str.substr(pos + 1), pattern); - if (used_hash && name == "rpcpassword") { + if (used_hash && name.find("rpcpassword") != std::string::npos) { error = strprintf("parse error on line %i, using # in rpcpassword can be ambiguous and should be avoided", linenr); return false; } -- cgit v1.2.3