fix(domain,app): own-key lookups for untrusted ids in the v2 migration, attachment and PDF size caps; EVAL-011, journal, TODO
This commit is contained in:
1 parent
17a6d9b323
commit
e7f4167ada
8 files changed
+76
-5
No files matched your search
@@ -37,3 +37,14 @@ describe('PDF attachment roundtrip', () => {
|
||||
).rejects.toThrow()
|
||||
})
|
||||
})
|
||||
|
||||
describe('size caps', () => {
|
||||
it('refuses an oversized PDF before parsing it', async () => {
|
||||
const { importReportFromPdf, ImportError, MAX_PDF_BYTES } =
|
||||
await import('@/pdf/import')
|
||||
const huge = new Uint8Array(MAX_PDF_BYTES + 1)
|
||||
await expect(
|
||||
importReportFromPdf(huge, sheet.sheet.migrationMap),
|
||||
).rejects.toBeInstanceOf(ImportError)
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user