Fix CI formatting issue.
This commit is contained in:
parent
ea1339720b
commit
5e12318954
@ -547,7 +547,9 @@ describe("applyMediaUnderstanding", () => {
|
|||||||
expect(ctx.Body).toContain("a\tb\tc");
|
expect(ctx.Body).toContain("a\tb\tc");
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skipIf(process.platform === "win32")("escapes XML special characters in filenames to prevent injection", async () => {
|
it.skipIf(process.platform === "win32")(
|
||||||
|
"escapes XML special characters in filenames to prevent injection",
|
||||||
|
async () => {
|
||||||
const { applyMediaUnderstanding } = await loadApply();
|
const { applyMediaUnderstanding } = await loadApply();
|
||||||
const dir = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-media-"));
|
const dir = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-media-"));
|
||||||
// Create file with XML special characters in the name (what filesystem allows)
|
// Create file with XML special characters in the name (what filesystem allows)
|
||||||
@ -579,7 +581,8 @@ describe("applyMediaUnderstanding", () => {
|
|||||||
expect(ctx.Body).toContain(">");
|
expect(ctx.Body).toContain(">");
|
||||||
// The raw < and > should not appear unescaped in the name attribute
|
// The raw < and > should not appear unescaped in the name attribute
|
||||||
expect(ctx.Body).not.toMatch(/name="[^"]*<[^"]*"/);
|
expect(ctx.Body).not.toMatch(/name="[^"]*<[^"]*"/);
|
||||||
});
|
},
|
||||||
|
);
|
||||||
|
|
||||||
it("normalizes MIME types to prevent attribute injection", async () => {
|
it("normalizes MIME types to prevent attribute injection", async () => {
|
||||||
const { applyMediaUnderstanding } = await loadApply();
|
const { applyMediaUnderstanding } = await loadApply();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user