mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-12 23:13:25 +02:00
Merge bitcoin/bitcoin#35116: net: cleanup SOCKS5 auth logging
3bf3b6d59anet: log SOCKS5 auth before sending (takeshikurosawaa)b2debc9276net: cleanup SOCKS5 auth logging (takeshikurosawaa) Pull request description: `Socks5()` logs the supplied `username` and `password` in `BCLog::PROXY` when the server selects `USER_PASS`. Keep the log entry for the auth path, but omit the credentials. Log the message before sending the authentication data. No functional behavior change intended. ACKs for top commit: davidgumberg: crACK3bf3b6d59atheStack: ACK3bf3b6d59asedited: ACK3bf3b6d59aTree-SHA512: ef90fca297b954c8659d108259b7f25216c0c0ddb7305539154f14a7bfdad807b70b7ddd0cf6e4ad0127d0a1ccfdfbb3f4785d7662b134409375ff1830b9df9b
This commit is contained in:
@@ -431,8 +431,8 @@ bool Socks5(const std::string& strDest, uint16_t port, const ProxyCredentials* a
|
||||
vAuth.insert(vAuth.end(), auth->username.begin(), auth->username.end());
|
||||
vAuth.push_back(auth->password.size());
|
||||
vAuth.insert(vAuth.end(), auth->password.begin(), auth->password.end());
|
||||
LogDebug(BCLog::PROXY, "SOCKS5 sending username/password authentication\n");
|
||||
sock.SendComplete(vAuth, g_socks5_recv_timeout, g_socks5_interrupt);
|
||||
LogDebug(BCLog::PROXY, "SOCKS5 sending proxy authentication %s:%s\n", auth->username, auth->password);
|
||||
uint8_t pchRetA[2];
|
||||
if (InterruptibleRecv(pchRetA, 2, g_socks5_recv_timeout, sock) != IntrRecvError::OK) {
|
||||
LogError("Error reading proxy authentication response\n");
|
||||
|
||||
Reference in New Issue
Block a user