This adds a log entry for when RPCAuth is detected. This keeps everything working as it currently is. I suppose it could be added as a nested if to also stop the creation of the cookie file if this would be wanted.
RPCAuth Detection in Logs #13118
pull Linrono wants to merge 1 commits into bitcoin:master from Linrono:patch-1 changing 1 files +5 −1-
Linrono commented at 9:59 PM on April 29, 2018: contributor
- fanquake added the label Utils/log/libs on Apr 29, 2018
-
in src/httprpc.cpp:231 in 6e2007f07a outdated
225 | @@ -226,6 +226,10 @@ static bool InitRPCAuthentication() 226 | 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/rpcuser for rpcauth auth generation.\n"); 227 | strRPCUserColonPass = gArgs.GetArg("-rpcuser", "") + ":" + gArgs.GetArg("-rpcpassword", ""); 228 | } 229 | + if (gArgs.GetArg("-rpcauth","") != "") 230 | + { 231 | + LogPrintf("RPCAuth user has been found.\n");
laanwj commented at 10:49 AM on May 2, 2018:I don't think this log message 'user has been found' is very illuminating, out of the blue. Something like
Using rpcauth authenticationwould be clearer, I think.
Linrono commented at 1:12 PM on May 2, 2018:I 100% agree with you and had that originally. The reason I changed it is because I do no verification that the entries are valid, just that they exist. I wanted to put the log wherever the client did the verification of them; but, as far as I can tell, they aren't even looked at until an RPC user authentication is attempted. I didn't want to promise that they are being used without doing so, and I didn't want to add any overhead in checking them without talking about it here first. I'd be happy to change it if you would like.
laanwj commented at 11:48 AM on May 14, 2018: memberLooks good to me. Please squash your commits (see here how: https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits), then this should be ready for merge.
dae0d13bbbRPCAuth Detection in Logs
This adds a log entry for when RPCAuth is used. Update httprpc.cpp
Linrono force-pushed on May 17, 2018Linrono commented at 3:42 AM on May 17, 2018: contributorSquashing done.
laanwj commented at 2:19 PM on July 10, 2018: memberutACK dae0d13bbb710346a8f4c8ecdf96937283e470df
laanwj merged this on Jul 10, 2018laanwj closed this on Jul 10, 2018laanwj referenced this in commit c05c93c5d8 on Jul 10, 2018Linrono deleted the branch on Aug 26, 2018deadalnix referenced this in commit f771ebd4b3 on Apr 9, 2020PastaPastaPasta referenced this in commit f9fc4a4e7d on Jul 9, 2020PastaPastaPasta referenced this in commit e53b1c4b5c on Jul 9, 2020ftrader referenced this in commit 7d1f461f60 on Aug 17, 2020MarcoFalke locked this on Sep 8, 2021Labels
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC
More mirrored repositories can be found on mirror.b10c.me