-
-
Notifications
You must be signed in to change notification settings - Fork 37.1k
http2: cannot negotiate ALPN besides http/1.1 #26835
Copy link
Copy link
Closed
Labels
help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.http2Issues and PRs related to the http2 subsystem.Issues and PRs related to the http2 subsystem.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
Description
Activity
Metadata
Metadata
Assignees
Labels
help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.http2Issues and PRs related to the http2 subsystem.Issues and PRs related to the http2 subsystem.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
The documentation for
'unknownProtocol'says this:The logic seems wrong though. It only passes through nothing (no protocol negotiated) or http/1.1, everything else is ignored:
node/lib/internal/http2/core.js
Lines 2614 to 2634 in 11f8024
Caveat: if the check is loosened, care should be taken not to introduce an information leak.
For an attacker it should not be possible to deduce whether the server has
{ allowHTTP1: true }and an'unknownProtocol'listener installed by sending messages with the ALPN proto set tohttp/1.1and e.g.hax/13.37, and then comparing the responses he gets back.