Files
openclaw/extensions
LZY3538 4e9b1f4775 fix(tlon): bound Urbit auth response body drain to prevent OOM (#109697)
* fix(tlon): bound Urbit auth response body drain to prevent OOM

Replace the unbounded response.text() body drain (discarded after reading
to finalize set-cookie headers) with a streaming reader capped at 64 KiB.
When no body stream is available, fall back to text() for compatibility.
A hostile or misconfigured Urbit endpoint could previously stream an
arbitrarily large body into memory during login.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(tlon): add curly braces to drain loop for lint compliance

* fix(tlon): remove unbounded text() fallback, cancel reader in finally

Remove the unbounded response.text() body-less fallback path. When no body
stream is available, there is nothing to drain — cookie headers are already
finalised. Move reader.cancel() into a finally block so the reader is
released even when read() throws.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-20 20:05:36 -07:00
..