Fix runtime image attachment paths

Allow nested /tmp generated images and per-room runtime workspace attachments after realpath/image validation.
This commit is contained in:
Eyejoker
2026-05-02 22:02:13 +09:00
committed by GitHub
parent 6ea4ec5b68
commit 4859c58f48
8 changed files with 66 additions and 40 deletions

View File

@@ -149,7 +149,10 @@ describe('message-runtime-final-delivery', () => {
expect.objectContaining({
channel,
log: logger,
attachmentBaseDirs: ['/work/room'],
attachmentBaseDirs: expect.arrayContaining([
'/work/room',
expect.stringMatching(/data\/workspaces\/room-folder$/),
]),
replaceMessageId: undefined,
isDuplicateOfLastBotFinal,
openContinuation,
@@ -189,7 +192,9 @@ describe('message-runtime-final-delivery', () => {
expect(deliverOpenWorkItem).toHaveBeenCalledWith(
expect.objectContaining({
replaceMessageId: 'discord-message-1',
attachmentBaseDirs: undefined,
attachmentBaseDirs: expect.arrayContaining([
expect.stringMatching(/data\/workspaces\/room-folder$/),
]),
}),
);
});