You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v0.10.5 — upload_image checks a local file's size before reading it
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixed
upload_imagepath checks the file before reading it. The path was read
whole with readFile() and only then compared to the 5 MB cap, so a path at a
multi-gigabyte file was buffered in memory first, and /dev/zero (a device
that never reaches end of file) was read until the process ran out of memory.
The file is now opened non-blocking and fstated on the same descriptor: a
directory, device or FIFO is refused as "not a regular file", a file over the
cap is refused from its size, and the read is bounded to that size, so a file
that grows during the read is refused rather than read past the cap. This only
affects the stdio binary; the remote surface never reads paths.
Changed
CI and CodeQL checkouts set persist-credentials: false, so GITHUB_TOKEN is
not left in the runner's git config for later steps (neither workflow pushes).
CI runs the unit tests on Node 20, 22, 24 and 26 instead of 20 only. That
surfaced a test that failed on 24 and 26: from Node 24, node:http's server
merges writes made in the same tick into one chunk, so the "one-byte HTTP
chunks" test was no longer sending one-byte chunks. It now writes the chunked
framing over raw TCP. fetchImage itself was unaffected: the client still
emits one event per chunk on every version, so its event cap still applies.