mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-10 04:33:59 +01:00
Reject incorrect base64 in HTTP auth
In addition, to make sure that no call site ignores the invalid decoding status, make the pf_invalid argument mandatory.
This commit is contained in:
@@ -19,7 +19,9 @@ BOOST_AUTO_TEST_CASE(base64_testvectors)
|
||||
{
|
||||
std::string strEnc = EncodeBase64(vstrIn[i]);
|
||||
BOOST_CHECK_EQUAL(strEnc, vstrOut[i]);
|
||||
std::string strDec = DecodeBase64(strEnc);
|
||||
bool invalid;
|
||||
std::string strDec = DecodeBase64(strEnc, &invalid);
|
||||
BOOST_CHECK(!invalid);
|
||||
BOOST_CHECK_EQUAL(strDec, vstrIn[i]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user