fail on bad base64 POST data
@@ -227,7 +227,12 @@ Client::run()
const char* content = urlSource.content();
std::string base64_decoded;
if (_args->_usePostMode && _args->_base64Decode) {
+ try {
base64_decoded = Base64::decode(content, cLen);
+ } catch (...) {
+ _status->SetError("POST request contains invalid base64 encoded data");
+ break;
+ }
content = base64_decoded.c_str();
cLen = base64_decoded.size();
}
