Commit 4dd6f4ab authored by Adam Langley's avatar Adam Langley Committed by Commit Bot

cablev2: accept WebSocket continuation frames.

When WebSocket connections pass through our frontend infrastructure their
frames can be fragmented, causing clients to see continuation frames.
Just accept these as data frames; we already handle the |final| flag so
defragmentation already works.

BUG=1002262

Change-Id: I17bea4ddc0a3cd07c558b3d1ca686b449bb9a3b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2463809
Commit-Queue: Adam Langley <agl@chromium.org>
Reviewed-by: default avatarMartin Kreichgauer <martinkr@google.com>
Cr-Commit-Position: refs/heads/master@{#816746}
parent 51d278d3
......@@ -120,7 +120,8 @@ void WebSocketAdapter::OnDataFrame(bool finish,
const size_t old_size = pending_message_.size();
const size_t new_size = old_size + data_len;
if (type != network::mojom::WebSocketMessageType::BINARY ||
if ((type != network::mojom::WebSocketMessageType::BINARY &&
type != network::mojom::WebSocketMessageType::CONTINUATION) ||
data_len > std::numeric_limits<uint32_t>::max() || new_size < old_size ||
new_size > kMaxIncomingMessageSize) {
FIDO_LOG(ERROR) << "invalid WebSocket frame (type: "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment