mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +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:
@@ -22,7 +22,9 @@ BOOST_AUTO_TEST_CASE(base32_testvectors)
|
||||
BOOST_CHECK_EQUAL(strEnc, vstrOut[i]);
|
||||
strEnc = EncodeBase32(vstrIn[i], false);
|
||||
BOOST_CHECK_EQUAL(strEnc, vstrOutNoPadding[i]);
|
||||
std::string strDec = DecodeBase32(vstrOut[i]);
|
||||
bool invalid;
|
||||
std::string strDec = DecodeBase32(vstrOut[i], &invalid);
|
||||
BOOST_CHECK(!invalid);
|
||||
BOOST_CHECK_EQUAL(strDec, vstrIn[i]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user