openclaw/docs/reference
Jason O'Neal 7fffbf60b0
fix: harden package URL downloads (#85578)
* fix: harden package URL downloads

Guard package acceptance URL downloads with HTTPS-only validation, no embedded credentials, private/special-use DNS and IP rejection, manual redirect checks, bounded timeout/size limits, pinned lookup, and atomic temp-file writes. Add tooling tests for unsafe URLs, redirect validation, size limits, and successful writes.

* fix: cancel redirect response bodies before closing dispatcher

ClawSweeper P2: the redirect branch in openPackageDownloadResponse cleared
the timeout and awaited dispatcher.close() without first cancelling
response.body. Undici's close() is graceful — it waits for in-flight
requests to complete — so a malicious redirect with a slow/never-ending
body could hang the hardened downloader.

Fix: call response.body?.cancel() before dispatcher.close() to abort the
redirect body immediately.

Test: add a regression test that uses a ReadableStream with an indefinite
interval to simulate a hanging body, and asserts cancel() was called.

Refs: clawsweeper review on PR #85512

* test: harden redirect body cancellation race in regression test

Guard the ReadableStream controller.enqueue() call with a cancelled
flag and try/catch to prevent ERR_INVALID_STATE when the interval
fires after cancel() closes the controller.

* fix: cancel final response body before closing dispatcher in downloadUrl

ClawSweeper P2: the HTTP-error and declared-oversize early-exit paths
in downloadUrl threw before consuming or canceling response.body. The
finally block then cleared the timeout and awaited graceful
dispatcher.close() with the body still open, allowing a slow/never-ending
response to hang release tooling.

Fix: add response.body?.cancel() in the finally block before
dispatcher.close().

Tests: add two regressions:
- HTTP 500 with slow body: asserts cancel() called before dispatcher close
- Declared content-length oversize with slow body: same assertion

* fix: add trusted package URL source policy

* fix: keep package URL resolver dependency-free

* test: cover encoded IPv6 package URL bypasses

* docs: sync package acceptance source overview

* docs: restore release doc formatting

* docs: sync package acceptance trusted-url source

* test: cover dotted IPv4 embedded IPv6 package URLs

* fix: parse dotted IPv4 embedded in IPv6 package URLs

* test: isolate anthropic pruning defaults

* test: move anthropic dated model coverage

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-23 17:28:29 +01:00
..
templates docs: absorb hook and subagent guidance PRs 2026-05-23 09:47:37 +01:00
AGENTS.default.md docs: absorb hook and subagent guidance PRs 2026-05-23 09:47:37 +01:00
api-usage-costs.md fix(status): show configured cost for aws-sdk models (#85619) 2026-05-23 15:49:57 +01:00
application-modernization-plan.md docs(reference): audit and fix 4 pages (typography, dup H1, Related) 2026-05-05 21:56:31 -07:00
code-mode.md docs: refine maintainer docs sweep 2026-05-22 19:22:40 +01:00
credits.md docs(reference): audit and fix 4 pages (typography, dup H1, Related) 2026-05-05 21:56:31 -07:00
device-models.md docs: drop parenthetical H1s across gateway, channels, providers, concepts, and reference pages 2026-04-24 10:49:23 -07:00
full-release-validation.md ci: add live Codex plugin release check 2026-05-21 08:44:18 +01:00
memory-config.md docs: align memory search cache default 2026-05-22 17:58:56 +01:00
openclaw-sdk-api-design.md feat(gateway): add SDK task ledger RPCs (#74847) 2026-05-09 00:55:06 -05:00
prompt-caching.md Revert "refactor: move runtime state to SQLite" 2026-05-13 13:33:38 +01:00
RELEASING.md fix: harden package URL downloads (#85578) 2026-05-23 17:28:29 +01:00
rich-output-protocol.md docs: clarify media directive formatting 2026-05-22 17:59:01 +01:00
rpc.md docs(imessage): make imsg the supported setup path 2026-05-07 12:53:01 -07:00
secret-placeholder-conventions.md fix(ci): clear signal and docs guard blockers (#85693) 2026-05-23 18:27:12 +08:00
secretref-credential-surface.md fix(cli): scope web command secret refs 2026-05-17 10:42:57 +01:00
secretref-user-supplied-credentials-matrix.json fix(cli): scope web command secret refs 2026-05-17 10:42:57 +01:00
session-management-compaction.md fix(auto-reply): preserve sessions after compaction failures (#70479) 2026-05-22 05:04:41 +00:00
test.md Add TUI PTY integration coverage (#85485) 2026-05-22 13:42:58 -07:00
token-use.md fix(status): show configured cost for aws-sdk models (#85619) 2026-05-23 15:49:57 +01:00
transcript-hygiene.md fix(agents): remove transient session-repair backups 2026-05-16 12:38:26 +01:00
wizard.md feat: add xai oauth web search and provider timeouts 2026-05-22 08:49:53 +01:00