fix(wechat): scrub image_url from sessions and harden vision handoff.
Memind CI / Test, build, and release guards (pull_request) Failing after 19s
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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user