Skip to content

Conversation

maaku
Copy link
Contributor

@maaku maaku commented Oct 16, 2014

This keeps the message from being output to the debug log by bitcoind. Fixes a possible security risk when starting bitcoind in server mode without the 'rpcpassword' option configured, resulting in the "suggested" password being output to the debug log.

Fixes #5094.

@@ -14,6 +14,9 @@

static bool noui_ThreadSafeMessageBox(const std::string& message, const std::string& caption, unsigned int style)
{
bool fSecure = style & CClientUIInterface::SECURE;
style ^= CClientUIInterface::SECURE;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure you don't mean:

style &= ~CClientUIInterface::SECURE

here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, yep. The first version had that line inside an if (fSecure) block. Fixing...

@laanwj
Copy link
Member

laanwj commented Oct 17, 2014

Looks like an acceptable solution to me (apart from sipa's nit).

…t the message contains sensitive information. This keeps the message from being output to the debug log by bitcoind. Fixes a possible security risk when starting bitcoind in server mode without the 'rpcpassword' option configured, resulting in the "suggested" password being output to the debug log.
@maaku maaku force-pushed the rpcpassword-in-debug-log branch from ea48502 to d4746d5 Compare October 17, 2014 07:37
@maaku
Copy link
Contributor Author

maaku commented Oct 17, 2014

Pushed an update last night fixing sipa's correct nit.

@TheBlueMatt
Copy link
Contributor

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tested ACK commithash d4746d56c0c45b8721da36bc19b2bdaba5d7d094
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJUQbR4AAoJEIm7uGY+LmXOhPEQAN/yAG2CrjWTcJqB+GDHeL4l
hncyJAVjpAasQFls0D9IxQP8vrb3bRy5m2JjU8npIKgrqJF0+785IZZFoGhw74d+
MofGkx9iFySg91y5VysmIARVAKuGiH6yK6udxSZvH7qU86u4CP/kRJe1qSO0NaMq
zTLab+QdCgwH02qo2sBQtz3+IosRb/+QvqE1JnaxRTcQXOmtatZl4YtA/8Kqq3LX
J6StzsiG+riMaXzm69OOX87Tp/AZa7git5QNxWhPSaHanq5T2sg7cQgOBEE/2cuY
padjK8MfuRer9nDnmgYuHegmKm0MSygc9F2Vk7s1rPpyzUZBZrkXHkPoFeCwZNh9
NsfMALYDRtfM6lZ8qhpn6KOIJPENscZj9WwMGsqdjyPcoqXPCW86Da//R7mDEg0n
EBY4h/xZLM3f00mCr9MKnw35rkKHI++F5poOTpIsfHp9czcJRIoAWKD8x1abfVgK
Inh0ewRXueaJls7xyWuVC3ZQzGmscrpvcntWpkSR/H8/P4pFQc83IbLtAzNRYTGs
Hf7zakkk3CHse6mFOxqRChr7dennNsSuelfA/mswBnreFpLtaZd90EEvR8OMEj13
rEKHvPim78IGObqhuzCOo7RvZMf6nk/9VedYrtzuNWBx4gTZmn6gaojwBWg+VwFX
eE67k9MpQ7aXsshfTDQ5
=ZIVM
-----END PGP SIGNATURE-----

@laanwj laanwj merged commit d4746d5 into bitcoin:master Oct 20, 2014
laanwj added a commit that referenced this pull request Oct 20, 2014
d4746d5 Add a SECURE style flag for ThreadSafeMessageBox, which indicates that the message contains sensitive information. This keeps the message from being output to the debug log by bitcoind. Fixes a possible security risk when starting bitcoind in server mode without the 'rpcpassword' option configured, resulting in the "suggested" password being output to the debug log. (Mark Friedenbach)
@laanwj
Copy link
Member

laanwj commented Oct 20, 2014

Tested ACK

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggested 'rpcpassword' should not be printed to debug.log
4 participants