What changed, and why it matters
This commit simply moves a debug log message so it prints before the SOCKS5 username/password data is sent over the network, rather than after. It does not change what data is sent, how it is encrypted, or who can read it. The change only helps developers diagnose connection problems by ensuring the log appears at the correct moment.
No security action required. Treat as a normal code-quality/logging improvement.
Security signals we found
No change to cryptographic handling or credential encoding
No change to network protocol or trust boundaries
Log message moved before network send for observability only
No memory-safety, input-validation, or authorization changes
Evidence from the diff
In src/netbase.cpp, the Socks5() function previously called sock.SendComplete(vAuth, …) before logging ‘SOCKS5 sending username/password authentication’. The patch swaps the order so the LogDebug() line executes before SendComplete(). This is a logging-order correction with no functional change to authentication, encryption, or the SOCKS5 protocol exchange. It is not a security fix in itself.
Changed components
src/netbase.cpp::Socks5() logging pathInspect captured patch +1 / −1
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 273b38f1..5434ec9f 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -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());
- sock.SendComplete(vAuth, g_socks5_recv_timeout, g_socks5_interrupt);
LogDebug(BCLog::PROXY, "SOCKS5 sending username/password authentication\n");
+ sock.SendComplete(vAuth, g_socks5_recv_timeout, g_socks5_interrupt);
uint8_t pchRetA[2];
if (InterruptibleRecv(pchRetA, 2, g_socks5_recv_timeout, sock) != IntrRecvError::OK) {
LogError("Error reading proxy authentication response\n");
Why this scored 19/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.