Skip to content

Commit

Permalink
rpc: Remove chain-specific RequireRPCPassword
Browse files Browse the repository at this point in the history
I've never liked the chain-specific exception to having to set a
password. It gives issues with zcash#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.
  • Loading branch information
laanwj authored and str4d committed Mar 2, 2017
1 parent 5bfd954 commit ce83df8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ class CMainParams : public CChainParams {

vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main));

fRequireRPCPassword = true;
fMiningRequiresPeers = true;
fDefaultConsistencyChecks = false;
fRequireStandard = true;
Expand Down Expand Up @@ -251,7 +250,6 @@ class CTestNetParams : public CMainParams {

vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test));

fRequireRPCPassword = true;
fMiningRequiresPeers = true;
fDefaultConsistencyChecks = false;
fRequireStandard = true;
Expand Down Expand Up @@ -328,7 +326,6 @@ class CRegTestParams : public CTestNetParams {
vFixedSeeds.clear(); //! Regtest mode doesn't have any fixed seeds.
vSeeds.clear(); //! Regtest mode doesn't have any DNS seeds.

fRequireRPCPassword = false;
fMiningRequiresPeers = false;
fDefaultConsistencyChecks = true;
fRequireStandard = false;
Expand Down
2 changes: 0 additions & 2 deletions src/chainparams.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ class CChainParams
/** Used if GenerateBitcoins is called with a negative number of threads */
int DefaultMinerThreads() const { return nMinerThreads; }
const CBlock& GenesisBlock() const { return genesis; }
bool RequireRPCPassword() const { return fRequireRPCPassword; }
/** Make miner wait to have peers to avoid wasting work */
bool MiningRequiresPeers() const { return fMiningRequiresPeers; }
/** Default value for -checkmempool and -checkblockindex argument */
Expand Down Expand Up @@ -103,7 +102,6 @@ class CChainParams
std::string strCurrencyUnits;
CBlock genesis;
std::vector<SeedSpec6> vFixedSeeds;
bool fRequireRPCPassword = false;
bool fMiningRequiresPeers = false;
bool fDefaultConsistencyChecks = false;
bool fRequireStandard = false;
Expand Down

0 comments on commit ce83df8

Please sign in to comment.