fix(wechat): scrub image_url from sessions and harden vision handoff.
Memind CI / Test, build, and release guards (pull_request) Failing after 19s

Strip image_url from persisted session payloads, keep image turns scoped to the active request, and align proxy/vision/page-data paths so WeChat image history does not leak into fresh sessions.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-29 14:04:15 +08:00
parent 2f51041822
commit 53c5f6d9c2
9 changed files with 222 additions and 7 deletions
+15
View File
@@ -35,6 +35,21 @@ test('runBasicFileScan warns for sandboxed html with inline script and trusted C
assert.deepEqual(result.findings, ['trusted_html_active_content']);
});
test('runBasicFileScan warns for sandboxed html with page-data-client and inline script', () => {
const result = runBasicFileScan(
Buffer.from(`<!doctype html>
<script src="/assets/page-data-client.js"></script>
<script>MindSpacePageData.createClient({ apiBase: "/api" });</script>`),
{
filename: 'survey.html',
mimeType: 'text/html',
htmlActiveContentPolicy: 'sandbox_warn',
},
);
assert.equal(result.scanStatus, 'warned');
assert.deepEqual(result.findings, ['trusted_html_active_content']);
});
test('runBasicFileScan still blocks unsafe html active content in sandbox mode', () => {
const javascriptUrl = runBasicFileScan(Buffer.from('<a href="javascript:alert(1)">go</a>'), {
filename: 'dashboard.html',