Skip to content

Commit

Permalink
Merge pull request from GHSA-qjfw-cvjf-f4fm
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik authored Apr 3, 2024
1 parent 68c61d2 commit 3a33e68
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Http2/Http2Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,15 @@ private function pushHeaderBlockFragment(int $streamId, string $buffer): void

$this->headerStream = $streamId;
$this->headerBuffer .= $buffer;

$headersTooLarge = \strlen($this->headerBuffer) > $this->headerSizeLimit;

if ($headersTooLarge) {
throw new Http2ConnectionException(
"Headers exceed the maximum configured size of {$this->headerSizeLimit} bytes",
self::COMPRESSION_ERROR
);
}
}

/** @see https://http2.github.io/http2-spec/#HEADERS */
Expand Down

0 comments on commit 3a33e68

Please sign in to comment.