diff --git a/public/script.js b/public/script.js index 8b89194..5c2e337 100644 --- a/public/script.js +++ b/public/script.js @@ -42,7 +42,7 @@ function handleFile(file) { ${file.name} ${(file.size / 1024).toFixed(2)} kB - Remove + `; if (!fileType) { diff --git a/src/pages/deleteJob.tsx b/src/pages/deleteJob.tsx index 59200f9..e70a32b 100644 --- a/src/pages/deleteJob.tsx +++ b/src/pages/deleteJob.tsx @@ -8,7 +8,9 @@ import { Jobs } from "../db/types"; export const deleteJob = new Elysia() .use(userService) - .get( + // SECURE: Use POST instead of GET for state-changing actions to prevent CSRF. + // Browsers automatically follow GET links, which can lead to silent data deletion. + .post( "/delete/:jobId", async ({ params, redirect, user }) => { const job = db diff --git a/src/pages/history.tsx b/src/pages/history.tsx index 2070679..8917698 100644 --- a/src/pages/history.tsx +++ b/src/pages/history.tsx @@ -185,15 +185,17 @@ export const history = new Elysia().use(userService).get( > - - - +
+ +
diff --git a/src/pages/results.tsx b/src/pages/results.tsx index a45c905..e439959 100644 --- a/src/pages/results.tsx +++ b/src/pages/results.tsx @@ -23,14 +23,16 @@ function ResultsArticle({

Results

- -

Delete

-
+
+ +