Skip to content

github-notifier: Restore MAX_BODY_LENGTH and raise from 200 kB to 1 MiB#2

Merged
Krinkle merged 1 commit into
mainfrom
restrict-size
Jul 3, 2026
Merged

github-notifier: Restore MAX_BODY_LENGTH and raise from 200 kB to 1 MiB#2
Krinkle merged 1 commit into
mainfrom
restrict-size

Conversation

@Krinkle

@Krinkle Krinkle commented Jul 2, 2026

Copy link
Copy Markdown
Member

Follows-up 0e9aa90 which introduced MAX_BODY_LENGTH, and fec6bd9 which removed it again due to being too low for static site deployments where small changes often change all files and thus produce fairly large GitHub Push eventsm because they are essentially a JSON wrapper around git show with a full file listing.

GitHub Docs promise to limit the 'added', 'removed', and 'changed' arrays to 5000 file paths each (if more, the array is capped, in favor of recommending you call their API for the full details instead), or 25 MB overall (event is dropped by them if still larger than that).

Note that we don't need any of this information, but there's no way to opt-out of this afaik.

Note that we did not actually remove the limit in that patch in practice, because we run it with Nginx in front, and that limits the request body to 1MiB. That has been large enough so reflect that in the Node.js service directly as well, to benefit other potential users of the package.

Credit to Quarkslab for the discovery and recommended mitigation.

Ref https://github.com/jquery/infrastructure/issues/565.

Follows-up 0e9aa90 which introduced MAX_BODY_LENGTH,
and fec6bd9 which removed it again due to being too low for static
site deployments where small changes often change all files and thus
produce fairly large GitHub Push eventsm because they are essentially
a JSON wrapper around `git show` with a full file listing.

GitHub Docs promise to limit the 'added', 'removed', and 'changed'
arrays to 5000 file paths each (if more, the array is capped, in favor
of recommending you call their API for the full details instead), or
25 MB overall (event is dropped by them if still larger than that).

Note that we don't need any of this information, but there's no way
to opt-out of this afaik.

Note that we did not actually remove the limit in that patch in
practice, because we run it with Nginx in front, and that limits the
request body to 1MiB. That has been large enough so reflect that in
the Node.js service directly as well, to benefit other potential users
of the package.

Credit to Quarkslab for the discovery and recommended mitigation.

Ref jquery/infrastructure#565.
@Krinkle Krinkle merged commit f0df8c2 into main Jul 3, 2026
9 checks passed
@Krinkle Krinkle deleted the restrict-size branch July 3, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants