Transaction

1fe3df71f05006b9779faf0a39efeb42780f8e2c21140d42ac16de3bcb78fcae
Timestamp (utc)
2024-03-27 21:54:14
Fee Paid
0.00000016 BSV
(
0.00689840 BSV
-
0.00689824 BSV
)
Fee Rate
10.05 sat/KB
Version
1
Confirmations
93,458
Size Stats
1,592 B

2 Outputs

Total Output:
0.00689824 BSV
  • j"1LAnZuoQdcKCkpDBKQMCgziGMoPC4VQUckM;<div class="post">I found what appears to be a bug: with a long enough username and password combination, the base64 encoder in bitcoind produces authorization headers that look like this:<br/><div class="codeheader">Code:</div><div class="code">POST / HTTP/1.1<br/>User-Agent: json-rpc/1.0<br/>Host: 127.0.0.1<br/>Content-Type: application/json<br/>Content-Length: 40<br/>Accept: application/json<br/>Authorization: Basic YWJiYWJiYWFiYmE6aGVsbG93b3JsZGhlbGxvd29ybGRoZWxsb3dvcmxkaGVsbG93<br/>b3JsZGhlbGxvd29ybGRoZWxsb3dvcmxk<br/></div>It inserts a newline every 64 characters, which obviously breaks the Authorization header, so commands like "bitcoin getinfo" fail. The server still works fine with properly behaving clients.<br/><br/>This can be solved by removing the newlines (and maybe ' 's) from result at the end of the Base64Encode function:<br/><div class="codeheader">Code:</div><div class="code">result.erase(std::remove(result.begin(), result.end(), ' '), result.end());<br/>result.erase(std::remove(result.begin(), result.end(), ' '), result.end());<br/></div>There's probably a more elegant solution, but that works for me. Here's a patch:<br/><a href="http://www.alloscomp.com/bitcoin/patches/bitcoin-svn-109-rpcbug-2010-07-25.patch">http://www.alloscomp.com/bitcoin/patches/bitcoin-svn-109-rpcbug-2010-07-25.patch</a></div> text/html
    https://whatsonchain.com/tx/1fe3df71f05006b9779faf0a39efeb42780f8e2c21140d42ac16de3bcb78fcae