zw-xysk
ebf9fcc02c
fix(feishu): log message content JSON parse failures instead of silently swallowing ( #107947 )
...
* fix(feishu): log message content JSON parse failures instead of silently swallowing
Replace formatErrorMessage(err) with safe metadata-only logging in
parseFeishuMessageContent to prevent potential message content leaks
through V8 JSON.parse error messages.
Changes:
- Remove formatErrorMessage import (security: V8 JSON.parse errors can
include input content in the message)
- Log only msgType and optional messageId (safe metadata) when parse
fails, never the exception message or raw content
- Add assertion that raw content is NOT present in the log output
- Pass messageId through to enable richer diagnostics
The raw content is still preserved as the function return value (existing
fallback behavior).
* fix(feishu): move parse-failure test into getMessageFeishu suite
The test 'logs a safe diagnostic (not raw content) when message content
is not valid JSON' was declared after the closing brace of
describe('getMessageFeishu'), so it did not inherit that suite's fixture
setup and reset hooks (beforeEach/afterAll). Move it inside the suite
so it benefits from the shared mock reset and cleanup.
Fixes ClawSweeper P2: 'Keep the parse-failure test inside the fetch suite'
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com >
2026-07-29 07:16:24 -04:00
..
2026-07-29 05:16:42 -04:00
2026-07-29 04:58:14 -04:00
2026-07-29 05:16:42 -04:00
2026-07-29 05:16:42 -04:00
2026-07-29 01:30:07 -04:00
2026-07-29 05:16:42 -04:00
2026-07-28 22:06:04 -04:00
2026-07-25 15:39:49 +08:00
2026-07-28 22:06:04 -04:00
2026-07-27 17:31:34 -04:00
2026-07-23 16:17:13 +00:00
2026-07-26 01:29:55 -04:00
2026-07-29 06:08:01 -04:00
2026-07-29 05:16:42 -04:00
2026-07-27 03:20:02 -04:00
2026-07-29 05:16:42 -04:00
2026-07-28 22:06:04 -04:00
2026-07-26 01:29:55 -04:00
2026-07-27 03:20:02 -04:00
2026-07-29 00:04:52 -04:00
2026-07-26 01:29:55 -04:00
2026-07-29 06:52:21 -04:00
2026-07-29 00:04:52 -04:00
2026-07-25 21:51:47 -07:00
2026-07-28 09:16:35 -04:00
2026-07-28 16:48:04 +08:00
2026-07-25 05:17:09 -07:00
2026-07-29 06:49:02 -04:00
2026-07-28 22:06:04 -04:00
2026-07-29 05:16:42 -04:00
2026-07-26 01:29:55 -04:00
2026-07-29 05:16:42 -04:00
2026-07-26 01:29:55 -04:00
2026-07-29 06:24:30 -04:00
2026-07-29 04:10:06 -04:00
2026-07-29 05:58:02 -04:00
2026-07-29 02:21:20 -04:00
2026-07-29 00:04:52 -04:00
2026-07-29 07:16:24 -04:00
2026-07-29 05:16:42 -04:00
2026-07-29 05:16:42 -04:00
2026-07-29 00:04:52 -04:00
2026-07-29 05:15:33 -04:00
2026-07-28 08:52:21 -04:00
2026-07-28 22:06:04 -04:00
2026-07-29 05:16:42 -04:00
2026-07-29 05:16:42 -04:00
2026-07-29 06:24:30 -04:00
2026-07-26 01:29:55 -04:00
2026-07-27 03:20:02 -04:00
2026-07-29 00:04:52 -04:00
2026-07-29 06:24:30 -04:00
2026-07-26 01:29:55 -04:00
2026-07-29 06:24:30 -04:00
2026-07-29 00:04:52 -04:00
2026-07-29 06:49:02 -04:00
2026-07-29 06:24:30 -04:00
2026-07-29 04:10:06 -04:00
2026-07-29 00:04:52 -04:00
2026-07-29 05:16:42 -04:00
2026-07-29 05:16:42 -04:00
2026-07-29 04:10:06 -04:00
2026-07-29 05:16:42 -04:00
2026-07-24 15:15:17 -07:00
2026-07-28 22:06:04 -04:00
2026-07-29 05:16:42 -04:00
2026-07-29 06:24:30 -04:00
2026-07-29 06:49:02 -04:00
2026-07-29 05:16:42 -04:00
2026-07-29 05:16:42 -04:00
2026-07-29 00:04:52 -04:00
2026-07-25 05:30:52 -07:00
2026-07-29 00:14:31 -04:00
2026-07-29 04:10:06 -04:00
2026-07-29 02:21:20 -04:00
2026-07-28 22:06:04 -04:00
2026-07-27 16:47:41 -04:00
2026-07-29 07:10:47 -04:00
2026-07-29 06:21:25 -04:00
2026-07-29 06:34:54 -04:00
2026-07-29 06:24:30 -04:00
2026-07-28 22:06:04 -04:00
2026-07-28 22:06:04 -04:00
2026-07-27 05:44:16 -04:00
2026-07-29 05:16:42 -04:00
2026-07-29 05:16:42 -04:00
2026-07-29 17:57:59 +08:00
2026-07-28 11:37:37 -04:00
2026-07-28 08:52:21 -04:00
2026-07-29 01:40:15 -04:00
2026-07-29 06:21:25 -04:00
2026-07-26 01:29:55 -04:00
2026-07-26 01:29:55 -04:00
2026-07-26 01:29:55 -04:00
2026-07-29 04:10:06 -04:00
2026-07-29 05:16:42 -04:00
2026-07-29 04:38:24 -05:00
2026-07-29 00:04:52 -04:00
2026-07-29 06:24:30 -04:00
2026-07-27 14:15:53 -04:00
2026-07-27 03:49:37 -04:00
2026-07-29 04:10:06 -04:00
2026-07-25 15:39:49 +08:00
2026-07-29 06:15:51 -04:00
2026-07-28 08:41:14 -04:00
2026-07-29 06:24:30 -04:00
2026-07-29 06:24:30 -04:00
2026-07-29 06:24:30 -04:00
2026-07-26 01:29:55 -04:00
2026-07-29 06:44:44 -04:00
2026-07-29 00:04:52 -04:00
2026-07-29 05:16:42 -04:00
2026-07-29 06:13:37 -04:00
2026-07-29 06:24:30 -04:00
2026-07-29 00:04:52 -04:00
2026-07-29 06:24:30 -04:00
2026-07-28 22:06:04 -04:00
2026-07-26 01:29:55 -04:00
2026-07-29 06:24:30 -04:00
2026-07-29 04:10:06 -04:00
2026-07-28 22:06:04 -04:00
2026-07-27 01:29:53 -04:00
2026-07-28 08:41:14 -04:00
2026-07-29 05:16:42 -04:00
2026-07-28 08:52:21 -04:00
2026-07-25 15:39:49 +08:00
2026-07-23 16:17:13 +00:00
2026-07-29 06:49:02 -04:00
2026-07-29 05:16:42 -04:00
2026-07-29 05:16:42 -04:00
2026-07-29 00:04:52 -04:00
2026-07-27 16:47:41 -04:00
2026-07-29 06:24:30 -04:00
2026-07-29 06:24:30 -04:00
2026-07-29 06:13:37 -04:00
2026-07-25 21:51:47 -07:00
2026-07-27 20:20:13 -04:00
2026-07-25 21:51:47 -07:00