From 5fb8f779ca1e4a5432fc8fd9c0fd243107b95de9 Mon Sep 17 00:00:00 2001 From: Shakker Date: Mon, 2 Feb 2026 20:36:47 +0000 Subject: [PATCH] fix: validate AbortSignal instances before calling AbortSignal.any() (#7277) (thanks @Elarwei001) --- CHANGELOG.md | 1 + src/agents/pi-tools.abort.ts | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd44ded9b..f318f24c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Docs: https://docs.openclaw.ai ### Fixes +- fix(agents): validate AbortSignal instances before calling AbortSignal.any() (#7277) (thanks @Elarwei001) - fix(webchat): respect user scroll position during streaming and refresh (#7226) (thanks @marcomarandiz) - Security: guard skill installer downloads with SSRF checks (block private/localhost URLs). - Media understanding: apply SSRF guardrails to provider fetches; allow private baseUrl overrides explicitly. diff --git a/src/agents/pi-tools.abort.ts b/src/agents/pi-tools.abort.ts index 90c8c7e4b..c7e50cab0 100644 --- a/src/agents/pi-tools.abort.ts +++ b/src/agents/pi-tools.abort.ts @@ -12,11 +12,7 @@ function throwAbortError(): never { * where the AbortSignal constructor may differ. */ function isAbortSignal(obj: unknown): obj is AbortSignal { - if (!obj || typeof obj !== "object") { - return false; - } - const signal = obj as Record; - return typeof signal.aborted === "boolean" && typeof signal.addEventListener === "function"; + return obj instanceof AbortSignal; } function combineAbortSignals(a?: AbortSignal, b?: AbortSignal): AbortSignal | undefined {