Skip to content

fix(webstreams): update buffer handling to support Uint8Array in finish - #171

Merged
bjohansebas merged 7 commits into
masterfrom
fix-dos
Jul 9, 2026
Merged

fix(webstreams): update buffer handling to support Uint8Array in finish#171
bjohansebas merged 7 commits into
masterfrom
fix-dos

Conversation

@bjohansebas

Copy link
Copy Markdown
Collaborator

Okay, after digging into this a bit more, I found a potential DoS issue caused by preserving behavior that was actually based on incorrect API usage. We used to protect against that, but now we fully rely on ReadableStream implementations following the spec and not mutating their own buffers. Also, since Web Streams naturally emit Uint8Array chunks, we can optimize this by avoiding copying the data into a new Buffer.

@bjohansebas
bjohansebas merged commit a3e031a into master Jul 9, 2026
24 checks passed
@bjohansebas
bjohansebas deleted the fix-dos branch July 9, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant