chore(deps): upgrade all dependencies, toolchains and images (#2825)

This commit is contained in:
Hampus authored and GitHub committed 2026-09-17 21:08:56 +02:00
1 parent 56e04e7b53
commit 3b552e00ef
510 files changed
+23614 -37473

No files matched your search

@@ -659,35 +659,33 @@ describe('Message Search Permissions', () => {
expect(user12Messages.length).toBeGreaterThan(0);
expect(user34Messages.length).toBe(0);
});
test.each([
'all_dms',
'open_dms',
'all',
'open_dms_and_all_guilds',
] as const)('scope: %s does not trust foreign DM context_channel_id', async (scope) => {
const user1 = await createTestAccount(harness);
const user2 = await createTestAccount(harness);
const attacker = await createTestAccount(harness);
await createFriendship(harness, user1, user2);
const dmChannel = await createDmChannel(harness, user1.token, user2.userId);
const canary = `foreign-dm-context-canary-${Date.now()}-${scope}`;
await sendChannelMessage(harness, user1.token, dmChannel.id, canary);
await markChannelAsIndexed(harness, dmChannel.id);
const result = await createBuilder<MessageSearchResponse>(harness, attacker.token)
.post('/search/messages')
.body({
content: canary,
scope,
context_channel_id: dmChannel.id,
})
.expect(HTTP_STATUS.OK)
.execute();
if (!isSearchResult(result)) {
expect.fail('Expected search result but got indexing response');
}
expect(result.messages.some((message) => message.channel_id === dmChannel.id)).toBe(false);
expect(result.messages.some((message) => message.content === canary)).toBe(false);
});
test.each(['all_dms', 'open_dms', 'all', 'open_dms_and_all_guilds'] as const)(
'scope: %s does not trust foreign DM context_channel_id',
async (scope) => {
const user1 = await createTestAccount(harness);
const user2 = await createTestAccount(harness);
const attacker = await createTestAccount(harness);
await createFriendship(harness, user1, user2);
const dmChannel = await createDmChannel(harness, user1.token, user2.userId);
const canary = `foreign-dm-context-canary-${Date.now()}-${scope}`;
await sendChannelMessage(harness, user1.token, dmChannel.id, canary);
await markChannelAsIndexed(harness, dmChannel.id);
const result = await createBuilder<MessageSearchResponse>(harness, attacker.token)
.post('/search/messages')
.body({
content: canary,
scope,
context_channel_id: dmChannel.id,
})
.expect(HTTP_STATUS.OK)
.execute();
if (!isSearchResult(result)) {
expect.fail('Expected search result but got indexing response');
}
expect(result.messages.some((message) => message.channel_id === dmChannel.id)).toBe(false);
expect(result.messages.some((message) => message.content === canary)).toBe(false);
},
);
test('scope: all_dms does not trust a guild context_channel_id', async () => {
const owner = await createTestAccount(harness);
const attacker = await createTestAccount(harness);
@@ -59,7 +59,7 @@ describe('Message Search Referenced Message', () => {
try {
await createBuilder(harness, token).post('/search/messages').body(body).expect(HTTP_STATUS.OK).execute();
const [invocation] = spy.mock.results;
if (!invocation || invocation.type !== 'return') {
if (invocation?.type !== 'return') {
throw new Error('SearchService.searchMessages did not return a result');
}
return await invocation.value;