Skip to content

Reject WebSocket handshakes with repeated or invalid version and key - #1113

Merged
markt-asf merged 1 commit into
apache:mainfrom
arturobernalg:rfc6455-websocket-single-key-version
Nov 5, 2026
Merged

markt-asf merged 1 commit into
apache:mainfrom
arturobernalg:rfc6455-websocket-single-key-version

Conversation

@arturobernalg

Copy link
Copy Markdown
Member

RFC 6455, sections 11.3.1 and 11.3.5 do not allow the Sec-WebSocket-Key and Sec-WebSocket-Version header fields to appear more than once in the opening handshake request, and section 4.2.1 requires the version to be
13. A request with repeated fields, or with a version list such as "8, 13", was accepted. Reject repeated fields with a 400 response and a version other than 13 with a 426 response.

RFC 6455, sections 11.3.1 and 11.3.5 do not allow the Sec-WebSocket-Key
and Sec-WebSocket-Version header fields to appear more than once in the
opening handshake request, and section 4.2.1 requires the version to be
13. A request with repeated fields, or with a version list such as
"8, 13", was accepted. Reject repeated fields with a 400 response and a
version other than 13 with a 426 response.
@markt-asf
markt-asf merged commit 0517433 into apache:main Nov 5, 2026
11 checks passed
markt-asf pushed a commit that referenced this pull request Nov 5, 2026
…1113)

RFC 6455, sections 11.3.1 and 11.3.5 do not allow the Sec-WebSocket-Key
and Sec-WebSocket-Version header fields to appear more than once in the
opening handshake request, and section 4.2.1 requires the version to be
13. A request with repeated fields, or with a version list such as
"8, 13", was accepted. Reject repeated fields with a 400 response and a
version other than 13 with a 426 response.
markt-asf pushed a commit that referenced this pull request Nov 5, 2026
(#1113)

RFC 6455, sections 11.3.1 and 11.3.5 do not allow the Sec-WebSocket-Key
and Sec-WebSocket-Version header fields to appear more than once in the
opening handshake request, and section 4.2.1 requires the version to be
13. A request with repeated fields, or with a version list such as
"8, 13", was accepted. Reject repeated fields with a 400 response and a
version other than 13 with a 426 response.
markt-asf pushed a commit that referenced this pull request Nov 5, 2026
(#1113)

RFC 6455, sections 11.3.1 and 11.3.5 do not allow the Sec-WebSocket-Key
and Sec-WebSocket-Version header fields to appear more than once in the
opening handshake request, and section 4.2.1 requires the version to be
13. A request with repeated fields, or with a version list such as
"8, 13", was accepted. Reject repeated fields with a 400 response and a
version other than 13 with a 426 response.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants