refactor(browser): remove arbitrary capture ceilings

This commit is contained in:
morluto
2026-09-29 15:31:27 +08:00
parent 4cea84d7cb
commit 5dd3b4655e
16 changed files with 228 additions and 125 deletions
@@ -56,4 +56,14 @@ describe("Electron file scope", () => {
await authorizedElectronFile("file:///tmp/root%2Findex.html", roots),
).toBeUndefined();
});
it("accepts file URLs with long query text inside a root", async () => {
const root = await createTestTempDirectory("rea-electron-long-url-");
const path = join(root, "index.html");
await writeFile(path, "allowed");
const roots = await canonicalElectronRoots([root]);
const value = `${pathToFileURL(path).href}?${"x".repeat(70_000)}`;
await expect(authorizedElectronFile(value, roots)).resolves.toBe(path);
});
});