Repository navigation
What's Changed
Security-relevant fixes
- Use the SAN type in Mbed TLS hostname verification (#2614). Mbed TLS keeps the GeneralName type of a subjectAltName entry apart from its value, and
verify_hostname()looked at the value only. AdNSNamewhose bytes equal an address therefore authenticated that IP host, and aniPAddressorrfc822Namemade of printable ASCII was matched as a DNS pattern. An IP host is now matched againstiPAddressentries only, and a host name againstdNSNameentries only.get_cert_sans()looked for the type inside the value, so it returned no entries for an ordinary certificate, or part of adNSNameas an entry of its own. It now returns the DNS, IP, email and URI entries with their types.
Bug fixes
- Don't resend the request body after a 303 redirect (#2606). A 303 response turns the follow-up request into a GET, but only the buffered body and the headers were cleared. A content provider (sized or chunked) stayed on the request, so the original payload was sent again with the GET, and for a chunked provider the unframed chunks also broke the keep-alive connection.
- Send the redirect
Locationpath as given (#2607). The path was percent-decoded before the follow-up request, which turned%23,%3Fand%25into a fragment delimiter, a query delimiter and a different octet, so the client requested a different resource than the one named. It also madeset_path_encode(false)fail on anyLocationcontaining%20. - WebSocket subprotocol negotiation:
- The client accepted any
Sec-WebSocket-Protocolvalue in the handshake response (#2595). A subprotocol the client did not offer now fails the handshake withError::WebSocketHandshake(RFC 6455 §4.1). - The server sent back whatever its
SubProtocolSelectorreturned, even a value outside the client's list. Such a value is now treated as no selection (RFC 6455 §4.2.2).
- The client accepted any
- Fix WebSocket pings being sent early on spurious wakeups (#2612). The heartbeat thread waited on its condition variable without a predicate, so a spurious wakeup sent a ping before the ping interval had elapsed. With
max_missed_pongsenabled, the early ping also counted toward the pong timeout. - SSE client: clear
Last-Event-IDon an emptyidfield (#2611). The client could not tell an emptyidfield from an event with noidfield, so it kept sending the stale ID on reconnect. An emptyidnow resets it and noLast-Event-IDheader is sent.
Documentation
- README-websocket: note that a
SubProtocolSelectorreturn value the client did not propose is ignored.
Full Changelog: v0.59.0...v0.60.0