Update http-parser for CVE. (#1387)

Motivation:

http-parser shipped a patche for node.js CVE-2019-15605, which allowed
HTTP request smuggling. This affected SwiftNIO as well, and so we need
to immediately ship an update to help protect affected users.

A CVE for SwiftNIO will follow, but as this patch is in the wild and
SwiftNIO is known to be affected we should not delay shipping this fix.

Modifications:

- Update http-parser.
- Add regression tests to validate this behaviour.

Result:

Close request smugging vector.
This commit is contained in:
Cory Benfield authored and GitHub committed 2020-02-10 16:44:44 +00:00
1 parent ddb7109142
commit bfde40cac8
7 files changed
+190 -32

No files matched your search

+3
View File
@@ -706,6 +706,9 @@ extension HTTPParserError {
return .paused
case HPE_UNKNOWN:
return .unknown
case HPE_INVALID_TRANSFER_ENCODING:
// The downside of enums here, we don't have a case for this. Map it to .unknown for now.
return .unknown
default:
return nil
}