Commit Graph

5273 Commits

Author SHA1 Message Date
Marcus Castro
eed8cd383f fix(agent): search all agent stores when resolving --session-id (#13579)
* fix(agent): search all agent stores when resolving --session-id

When `--session-id` was provided without `--to` or `--agent`, the reverse
lookup only searched the default agent's session store. Sessions created
under a specific agent (e.g. `--agent mybot`) live in that agent's store
file, so the lookup silently failed and the session was not reused.

Now `resolveSessionKeyForRequest` iterates all configured agent stores
when the primary store doesn't contain the requested sessionId.

Fixes #12881

* fix: search other agent stores when --to key does not match --session-id

When --to derives a session key whose stored sessionId doesn't match the
requested --session-id, the cross-store search now also runs. This handles
the case where a user provides both --to and --session-id targeting a
session in a different agent's store.
2026-02-13 18:46:54 +01:00
AI-Reviewer-QS
649826e435 fix(security): block private/loopback/metadata IPs in link-understanding URL detection (#15604)
* fix(security): block private/loopback/metadata IPs in link-understanding URL detection

isAllowedUrl() only blocked 127.0.0.1, leaving localhost, ::1, 0.0.0.0,
private RFC1918 ranges, link-local (169.254.x.x including cloud metadata),
and CGNAT (100.64.0.0/10) accessible for SSRF via link-understanding.

Add comprehensive hostname/IP blocking consistent with the SSRF guard
already used by media/fetch.ts.

* fix(security): harden link-understanding SSRF host checks

* fix: note link-understanding SSRF hardening in changelog (#15604) (thanks @AI-Reviewer-QS)

---------

Co-authored-by: Yi LIU <yi@quantstamp.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-13 18:38:40 +01:00
Peter Steinberger
fdfc34fa1f perf(test): stabilize e2e harness and reduce flaky gateway coverage 2026-02-13 17:32:14 +00:00
Marcus Castro
d91e995e46 fix(inbound): preserve literal backslash-n sequences in Windows paths (#11547)
* fix(inbound): preserve literal backslash-n sequences in Windows paths

The normalizeInboundTextNewlines function was converting literal backslash-n
sequences (\n) to actual newlines, corrupting Windows paths like
C:\Work\nxxx\README.md when sent through WebUI.

This fix removes the .replaceAll("\\n", "\n") operation, preserving
literal backslash-n sequences while still normalizing actual CRLF/CR to LF.

Fixes #7968

* fix(test): set RawBody to Windows path so BodyForAgent fallback chain tests correctly

* fix: tighten Windows path newline regression coverage (#11547) (thanks @mcaxtr)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-13 18:24:01 +01:00
Marcus Castro
3d921b6157 fix(slack): apply limit parameter to emoji-list action (#13421)
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 67e9b648581c30a6472ac993dcc404e2d104ad1c
Co-authored-by: mcaxtr <7562095+mcaxtr@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Reviewed-by: @steipete
2026-02-13 18:20:41 +01:00
Mariano Belinky
86e4fe0a7a Auth: land codex oauth onboarding flow (#15406) 2026-02-13 17:18:49 +00:00
Marcus Castro
7ec60d6449 fix: use relayAbort helper for addEventListener to preserve AbortError reason 2026-02-13 18:13:18 +01:00
Marcus Castro
5ac8d1d2bb test: add abort .bind() behavioral tests (#7174) 2026-02-13 18:13:18 +01:00
Marcus Castro
d9c582627c perf: use .abort.bind() instead of arrow closures to prevent memory leaks (#7174) 2026-02-13 18:13:18 +01:00
Shadow
d637a26350 Gateway: sanitize WebSocket log headers (#15592) 2026-02-13 11:11:54 -06:00
Marcus Castro
b3b49bed80 fix(slack): override video/* MIME to audio/* for voice messages (#14941)
* fix(slack): override video/* MIME to audio/* for voice messages

* fix(slack): preserve overridden MIME in return value

* test(slack): fix media monitor MIME mock wiring

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-13 18:09:04 +01:00
headswim
f4e295a63b Discord: fix bare guild ID misrouted as channel ID in parser
The channel allowlist parser matches bare numeric strings as channel IDs
before checking for guild IDs, causing guild snowflakes to hit Discord's
/channels/ endpoint (404). Prefix guild-only entries with 'guild:' so the
parser routes them to the correct guild resolution path.

Fixes both the monitor provider and onboarding wizard call sites.
Adds regression tests.
2026-02-13 11:03:10 -06:00
Shadow
5325d2ca51 Discord: gate guild prefix to numeric keys 2026-02-13 10:57:29 -06:00
Lilo
397011bd78 fix: increase image tool maxTokens from 512 to 4096 (#11770)
* increase image tool maxTokens from 512 to 4096

* fix: cap image tool tokens by model capability (#11770) (thanks @detecti1)

* docs: fix changelog attribution for #11770

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-13 17:52:27 +01:00
Burak Sormageç
1c36bec970 Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-13 17:48:04 +01:00
Burak Sormageç
ff0ce32840 Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-13 17:48:04 +01:00
Burak Sormageç
23b1b51568 fix(windows): normalize env entries for spawn 2026-02-13 17:48:04 +01:00
Burak Sormageç
e97aa45428 fix(windows): handle undefined environment variables in runCommandWithTimeout 2026-02-13 17:48:04 +01:00
Burak Sormageç
d7fb01afad fix(windows): resolve command execution and binary detection issues 2026-02-13 17:48:04 +01:00
Peter Steinberger
1eccfa8934 perf(test): trim duplicate e2e suites and harden signal hooks 2026-02-13 16:46:43 +00:00
Peter Steinberger
45b9aad0f4 fix(imessage): prevent rpc spawn in tests 2026-02-13 17:36:37 +01:00
Peter Steinberger
aa7fbf0488 perf(test): trim duplicate sanitize-session-history e2e cases 2026-02-13 16:21:59 +00:00
Peter Steinberger
b272158fe4 perf(test): eliminate resetModules via injectable seams 2026-02-13 16:20:37 +00:00
Yi Liu
14fc742000 fix(security): restrict canvas IP-based auth to private networks (#14661)
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 9e4e1aca4a89fc4df572681a1146af31b1a3cd50
Co-authored-by: sumleo <29517764+sumleo@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Reviewed-by: @steipete
2026-02-13 17:13:31 +01:00
Peter Steinberger
e665d77917 perf(test): remove extra module resets in cli and message suites 2026-02-13 16:08:38 +00:00
Sk Akram
4c86821aca fix: allow device-paired clients to retrieve TTS API keys (#14613)
* refactor: add config.get to READ_METHODS set

* refactor(gateway): scope talk secrets via talk.config

* fix: resolve rebase conflicts for talk scope refactor

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-13 17:07:49 +01:00
Peter Steinberger
c2f7b66d22 perf(test): replace module resets with direct spies and runtime seams 2026-02-13 16:04:49 +00:00
Omair Afzal
59733a02c8 fix(configure): reject literal "undefined" and "null" gateway auth tokens (#13767)
* fix(configure): reject literal "undefined" and "null" gateway auth tokens

* fix(configure): reject literal "undefined" and "null" gateway auth tokens

* fix(configure): validate gateway password prompt and harden token coercion (#13767) (thanks @omair445)

* test: remove unused vitest imports in baseline lint fixtures (#13767)

---------

Co-authored-by: Luna AI <luna@coredirection.ai>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-13 17:04:41 +01:00
Peter Steinberger
767fd9f222 fix: classify /tools/invoke errors and sanitize 500s (#13185) (thanks @davidrudduck) 2026-02-13 16:58:30 +01:00
David Rudduck
242f2f1480 fix: return 500 for tool execution failures instead of 400
Tool runtime errors are server-side faults, not client input errors.
Returning 400 causes clients to mishandle retries/backoff.

Addresses Greptile review feedback on #13185.
2026-02-13 16:58:30 +01:00
David Rudduck
f788de30c8 fix(security): sanitize error responses to prevent information leakage (#5)
* fix(security): sanitize error responses to prevent information leakage

Replace raw error messages in HTTP responses with generic messages.
Internal error details (stack traces, module paths, error messages)
were being returned to clients in 4 gateway endpoints.

* fix: sanitize 2 additional error response leaks in openresponses-http

Address CodeRabbit feedback: non-stream and streaming error paths in
openresponses-http.ts were still returning String(err) to clients.

* fix: add server-side error logging to sanitized catch blocks

Restore err parameter and add logWarn() calls so errors are still
captured server-side for diagnostics while keeping client responses
sanitized. Addresses CodeRabbit feedback about silently discarded errors.
2026-02-13 16:58:30 +01:00
Peter Steinberger
de7d94d9e2 perf(test): remove resetModules from config/sandbox/message suites 2026-02-13 15:58:08 +00:00
Peter Steinberger
02fe0c840e perf(test): remove resetModules from auth/models/subagent suites 2026-02-13 15:53:32 +00:00
Ahmad Bitar
c179f71f42 feat: Android companion app improvements & gateway URL camera payloads (#13541)
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 9c179c9c3192ec76059f5caac1e8de8bdfb257ce
Co-authored-by: smartprogrammer93 <33181301+smartprogrammer93@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Reviewed-by: @steipete
2026-02-13 16:49:28 +01:00
Peter Steinberger
41f2f359a5 perf(test): reduce module reload overhead in key suites 2026-02-13 15:45:19 +00:00
Peter Steinberger
4337fa2096 fix: remove any from doctor-security dmScope regression test (#13129) (thanks @VintLin) 2026-02-13 16:43:39 +01:00
Peter Steinberger
f612e35907 fix: add dmScope guidance regression coverage (#13129) (thanks @VintLin) 2026-02-13 16:43:39 +01:00
VintLin
ca3c83acdf fix(security): clarify dmScope remediation path with explicit CLI command
# Problem
The security audit and onboarding screens suggested 'Set session.dmScope="..."'
for multi-user DM isolation. This led users to try setting the value in invalid
config paths (e.g., 'channels.imessage.dmScope').

# Changes
- Updated 'src/security/audit.ts' to use 'formatCliCommand' for dmScope remediation.
- Updated 'src/commands/doctor-security.ts' and 'src/commands/onboard-channels.ts'
  to use the explicit 'openclaw config set' command format.

# Validation
- Verified text alignment with 'pnpm tsgo'.
- Confirmed CLI command formatting remains consistent across modified files.
2026-02-13 16:43:39 +01:00
Peter Steinberger
31c6a12cfa fix(agents): restore missing runtime helpers and sandbox types 2026-02-13 15:42:05 +00:00
David Rudduck
5643a93479 fix(security): default standalone servers to loopback bind (#13184)
* fix(security): default standalone servers to loopback bind (#4)

Change canvas host and telegram webhook default bind from 0.0.0.0
(all interfaces) to 127.0.0.1 (loopback only) to prevent unintended
network exposure when no explicit host is configured.

* fix: restore telegram webhook host override while keeping loopback defaults (openclaw#13184) thanks @davidrudduck

* style: format telegram docs after rebase (openclaw#13184) thanks @davidrudduck

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-13 16:39:56 +01:00
Peter Steinberger
5d8eef8b35 perf(test): remove module reloads in browser and embedding suites 2026-02-13 15:31:17 +00:00
davidbors-snyk
29d7839582 fix: execute sandboxed file ops inside containers (#4026)
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 795ec6aa2f311fcda6660876dbadb4ef356bc0ac
Co-authored-by: davidbors-snyk <240482518+davidbors-snyk@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Reviewed-by: @steipete
2026-02-13 16:29:10 +01:00
Peter Steinberger
1def8c5448 fix(security): extend audit hardening checks 2026-02-13 16:26:58 +01:00
Peter Steinberger
faa4959111 fix(onboard): include vllm auth group id 2026-02-13 15:23:46 +00:00
loiie45e
2e04630105 openai-codex: add gpt-5.3-codex-spark forward-compat model (#15174)
Merged via maintainer flow after rebase + local gates.

Prepared head SHA: 6cac87cbf97e5f627085787fe5f565778fa223bf

Co-authored-by: loiie45e <15420100+loiie45e@users.noreply.github.com>
Co-authored-by: mbelinky <2406260+mbelinky@users.noreply.github.com>
2026-02-13 15:21:07 +00:00
Henry Loenwind
96318641d8 fix: Finish credential redaction that was merged unfinished (#13073)
* Squash

* Removed unused files

Not mine, someone merged that stuff in earlier.

* fix: patch redaction regressions and schema breakages

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-13 16:19:21 +01:00
Peter Steinberger
faec6ccb1d perf(test): reduce module reload churn in unit suites 2026-02-13 15:19:13 +00:00
Yi Liu
6c4c535813 fix(security): handle additional Unicode angle bracket homoglyphs in content sanitization (#14665)
* fix(security): handle additional Unicode angle bracket homoglyphs in content sanitization

The foldMarkerChar function sanitizes external content markers to
prevent prompt injection boundary escapes, but only handles fullwidth
ASCII (U+FF21-FF5A) and fullwidth angle brackets (U+FF1C/FF1E).

Add handling for additional visually similar Unicode characters that
could be used to craft fake end markers:
- Mathematical angle brackets (U+27E8, U+27E9)
- CJK angle brackets (U+3008, U+3009)
- Left/right-pointing angle brackets (U+2329, U+232A)
- Single angle quotation marks (U+2039, U+203A)
- Small less-than/greater-than signs (U+FE64, U+FE65)

* test(security): add homoglyph marker coverage

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-13 16:18:54 +01:00
Tonic
08b7932df0 feat(agents) : Hugging Face Inference provider first-class support and Together API fix and Direct Injection Refactor Auths [AI-assisted] (#13472)
* initial commit

* removes assesment from docs

* resolves automated review comments

* resolves lint , type , tests , refactors , and submits

* solves : why do we have to lint the tests xD

* adds greptile fixes

* solves a type error

* solves a ci error

* refactors auths

* solves a failing test after i pulled from main lol

* solves a failing test after i pulled from main lol

* resolves token naming issue to comply with better practices when using hf / huggingface

* fixes curly lints !

* fixes failing tests for google api from main

* solve merge conflicts

* solve failing tests with a defensive check 'undefined' openrouterapi key

* fix: preserve Hugging Face auth-choice intent and token behavior (#13472) (thanks @Josephrp)

* test: resolve auth-choice cherry-pick conflict cleanup (#13472)

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-13 16:18:16 +01:00
Peter Steinberger
4169a4df79 perf(test): remove redundant status module reloads 2026-02-13 15:11:38 +00:00