Skip to content

Commit e34ad51

Browse files
committed
test(files): fix external-URL assertion to handle undefined error
1 parent e0d676b commit e34ad51

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/sim/app/api/files/parse/route.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,9 @@ describe('Files Parse API - Path Traversal Security', () => {
821821
const response = await POST(request)
822822
const result = await response.json()
823823

824-
expect(result.error).not.toMatch(/Access denied: path traversal detected/)
824+
expect(result.error ?? '').not.toContain('path traversal detected')
825+
// The URL reaching the pinned fetch proves it passed validation and routed
826+
// to external-URL handling rather than being rejected as a local path.
825827
expect(inputValidationMockFns.mockSecureFetchWithPinnedIP).toHaveBeenCalledWith(
826828
slackUrl,
827829
'203.0.113.10',

0 commit comments

Comments
 (0)