aboutsummaryrefslogtreecommitdiff
path: root/src/rpcserver.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-07-08 14:47:39 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-07-10 15:01:55 +0200
commit85ee55b5c37bedca98ec472439e1710277e8e4b2 (patch)
tree23b253176a0570875c274982ec1172545e40d699 /src/rpcserver.cpp
parent11576a57d2ee37aa421e0fce69e70751b5af9a61 (diff)
downloadbitcoin-85ee55b5c37bedca98ec472439e1710277e8e4b2.tar.xz
rpc: Remove chain-specific RequireRPCPassword
I've never liked the chain-specific exception to having to set a password. It gives issues with #6388 which makes it valid to set no password in every case (as it enables random cookie authentication). This pull removes the flag, so that all chains are regarded the same. It also removes the username==password test, which doesn't provide any substantial extra security.
Diffstat (limited to 'src/rpcserver.cpp')
-rw-r--r--src/rpcserver.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 287cfb2f13..daf10736bf 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -598,8 +598,7 @@ void StartRPCThreads()
LogPrint("rpc", "Allowing RPC connections from: %s\n", strAllowed);
strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"];
- if (((mapArgs["-rpcpassword"] == "") ||
- (mapArgs["-rpcuser"] == mapArgs["-rpcpassword"])) && Params().RequireRPCPassword())
+ if (mapArgs["-rpcpassword"] == "")
{
unsigned char rand_pwd[32];
GetRandBytes(rand_pwd, 32);