Avoid leaking connections that had partially-consumed
client data on unexpected disconnect.
Resolves CVE-2020-1700 (moderate impact flaw).
Fixes: https://tracker.ceph.com/issues/42531
Signed-off-by: Or Friedmann <ofriedma@redhat.com>
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
while (body_remaining.size && !parser.is_done()) {
boost::system::error_code ec;
http::async_read_some(stream, buffer, parser, yield[ec]);
- if (ec == http::error::partial_message ||
- ec == http::error::need_buffer) {
+ if (ec == http::error::need_buffer) {
break;
}
if (ec) {