Skip to content

Commit

Permalink
Merge pull request #286 from ngtcp2/deny-new-server-bidi-stream
Browse files Browse the repository at this point in the history
Explicitly deny new server-initiated bidirectional stream
  • Loading branch information
tatsuhiro-t authored Dec 29, 2024
2 parents 444f491 + d35c8f8 commit 87bb001
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/nghttp3_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,10 @@ nghttp3_ssize nghttp3_conn_read_stream(nghttp3_conn *conn, int64_t stream_id,
return rv;
}
}
} else if(!nghttp3_stream_uni(stream_id)) {
/* server does not expect to receive new server initiated
bidirectional stream from client. */
return NGHTTP3_ERR_H3_STREAM_CREATION_ERROR;
} else {
/* unidirectional stream */
if (srclen == 0 && fin) {
Expand Down

0 comments on commit 87bb001

Please sign in to comment.