mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-12 18:42:33 +02:00
rpc: Undeprecate rpcuser/rpcpassword, change message to security warning
Back in 2015, in #7044, we added configuration option `rpcauth` for multiple RPC users. At the same time the old settings for single-user configuration `rpcuser` and `rpcpassword` were "soon" to be deprecated. The main reason for this deprecation is that while `-rpcpassword` stores the password in plain text, `-rpcauth` stores a hash, so it doesn't appear in the configuration in plain text. As the options are still in active use, actually removing them is expected to be a hassle to many, and it's not clear that is worth it. As for the security risk, in many kinds of setups (no wallet, containerized, single-user-single-application, local-only, etc) it is an unlikely point of escalation. In the end, it is good to encourage secure practices, but it is the responsibility of the user. Log a clear warning but remove the deprecation notice. Closes #29240.
This commit is contained in:
@ -314,7 +314,8 @@ static bool InitRPCAuthentication()
|
||||
LogInfo("Using random cookie authentication.");
|
||||
}
|
||||
} else {
|
||||
LogPrintf("Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcauth for rpcauth auth generation.\n");
|
||||
LogInfo("Using rpcuser/rpcpassword authentication.");
|
||||
LogWarning("The use of rpcuser/rpcpassword is less secure, because credentials are configured in plain text. It is recommended that locally-run instances switch to cookie-based auth, or otherwise to use hashed rpcauth credentials. See share/rpcauth in the source directory for more information.");
|
||||
strRPCUserColonPass = gArgs.GetArg("-rpcuser", "") + ":" + gArgs.GetArg("-rpcpassword", "");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user