mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Error if rpcpassword contains hash in conf sections
This commit is contained in:
parent
031e3a32b2
commit
8cff83124b
2 changed files with 9 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue