openclaw/extensions/mattermost/src
Jacob Tomlinson f92c92515b
fix(extensions): route fetch calls through fetchWithSsrFGuard (#53929)
* fix(extensions): route fetch calls through fetchWithSsrFGuard

Replace raw fetch() with fetchWithSsrFGuard in BlueBubbles, Mattermost,
Nextcloud Talk, and Thread Ownership extensions so outbound requests go
through the shared DNS-pinning and network-policy layer.

BlueBubbles: thread allowPrivateNetwork from account config through all
fetch call sites (send, chat, reactions, history, probe, attachments,
multipart). Add _setFetchGuardForTesting hook for test overrides.

Mattermost: add guardedFetchImpl wrapper in createMattermostClient that
buffers the response body before releasing the dispatcher. Handle
null-body status codes (204/304).

Nextcloud Talk: wrap both sendMessage and sendReaction with
fetchWithSsrFGuard and try/finally release.

Thread Ownership: add fetchWithSsrFGuard and ssrfPolicyFromAllowPrivateNetwork
to the plugin SDK surface; use allowPrivateNetwork:true for the
Docker-internal forwarder.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(extensions): improve null-body handling and test harness cleanup

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(bluebubbles): default to strict SSRF policy when allowPrivateNetwork is unset

Callers that omit allowPrivateNetwork previously got undefined policy,
which caused blueBubblesFetchWithTimeout to fall through to raw fetch
and bypass the SSRF guard entirely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(bluebubbles): thread allowPrivateNetwork through action and monitor call sites

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(mattermost,nextcloud-talk): add allowPrivateNetwork config for self-hosted/LAN deployments

* fix: regenerate config docs baseline for new allowPrivateNetwork fields

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 02:04:54 -07:00
..
mattermost fix(extensions): route fetch calls through fetchWithSsrFGuard (#53929) 2026-03-26 02:04:54 -07:00
channel.test.ts fix(extensions): route fetch calls through fetchWithSsrFGuard (#53929) 2026-03-26 02:04:54 -07:00
channel.ts fix: keep message-tool buttons optional for Telegram and Mattermost (#52589) (thanks @tylerliu612) 2026-03-23 14:43:41 +05:30
config-schema.test.ts feat(mattermost): add replyToMode support (off | first | all) (#29587) 2026-03-12 18:03:12 +05:30
config-schema.ts fix(extensions): route fetch calls through fetchWithSsrFGuard (#53929) 2026-03-26 02:04:54 -07:00
group-mentions.test.ts refactor: shrink plugin sdk public surface 2026-03-18 23:31:08 +00:00
group-mentions.ts Mattermost: normalize plugin imports 2026-03-18 02:18:06 +00:00
normalize.test.ts CI: restore main detect-secrets scan (#38438) 2026-03-07 10:06:35 -08:00
normalize.ts feat(mattermost): add interactive buttons support (#19957) 2026-03-05 20:14:57 +05:30
runtime-api.ts Plugins: internalize mattermost and tlon SDK imports 2026-03-17 19:05:51 -07:00
runtime.ts Mattermost: normalize plugin imports 2026-03-18 02:18:06 +00:00
secret-input.ts refactor: converge plugin sdk channel helpers 2026-03-19 00:25:19 +00:00
session-route.test.ts test(mattermost): cover routing helpers 2026-03-22 17:49:35 -07:00
session-route.ts refactor: consolidate plugin sdk surface 2026-03-20 19:24:10 +00:00
setup-core.ts refactor: consolidate plugin sdk surface 2026-03-20 19:24:10 +00:00
setup-surface.ts refactor: share channel setup status helpers 2026-03-23 01:56:01 +00:00
setup.test.ts test: collapse setup and monitor channel suites 2026-03-25 04:25:02 +00:00
types.ts fix(extensions): route fetch calls through fetchWithSsrFGuard (#53929) 2026-03-26 02:04:54 -07:00