RPCAuth Detection in Logs #13118

pull Linrono wants to merge 1 commits into bitcoin:master from Linrono:patch-1 changing 1 files +5 −1
  1. Linrono commented at 9:59 PM on April 29, 2018: contributor

    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.

  2. fanquake added the label Utils/log/libs on Apr 29, 2018
  3. 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 authentication would 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.

  4. Linrono commented at 5:42 PM on May 4, 2018: contributor

    I went ahead and made the change suggested by @laanwj. I also threw in a period on another line for conformity's sake.

  5. laanwj commented at 11:48 AM on May 14, 2018: member

    Looks 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.

  6. RPCAuth Detection in Logs
    This adds a log entry for when RPCAuth is used.
    
    Update httprpc.cpp
    dae0d13bbb
  7. Linrono force-pushed on May 17, 2018
  8. Linrono commented at 3:42 AM on May 17, 2018: contributor

    Squashing done.

  9. laanwj commented at 2:19 PM on July 10, 2018: member

    utACK dae0d13bbb710346a8f4c8ecdf96937283e470df

  10. laanwj merged this on Jul 10, 2018
  11. laanwj closed this on Jul 10, 2018

  12. laanwj referenced this in commit c05c93c5d8 on Jul 10, 2018
  13. Linrono deleted the branch on Aug 26, 2018
  14. deadalnix referenced this in commit f771ebd4b3 on Apr 9, 2020
  15. PastaPastaPasta referenced this in commit f9fc4a4e7d on Jul 9, 2020
  16. PastaPastaPasta referenced this in commit e53b1c4b5c on Jul 9, 2020
  17. ftrader referenced this in commit 7d1f461f60 on Aug 17, 2020
  18. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

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

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me