mirror of
https://github.com/apple/swift-nio
synced 2026-11-29 05:24:21 +00:00
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:
1 parent
ddb7109142
commit
bfde40cac8
7 files changed
+190
-32
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user