fix: XSS Vulnerability (#17)
Commit / ci (push) Has been cancelled

Resolves #1

Reviewed-on: #17
This commit was merged in pull request #17.
This commit is contained in:
2026-04-03 13:09:45 +02:00
parent 2e16cf9d51
commit 239bf163e8
4 changed files with 52 additions and 0 deletions
+3
View File
@@ -7,6 +7,7 @@ import * as v from 'valibot';
import { ensureAuth } from '$lib/auth';
import { db } from '$lib/server/db';
import { aktis } from '$lib/server/db/schema';
import sanitizeHtml from 'sanitize-html';
export const load: PageServerLoad = async (event) => {
await ensureAuth(event);
return {};
@@ -28,6 +29,8 @@ export const actions = {
if (!akti) return {};
akti.body = sanitizeHtml(akti.body);
const res = await db
.insert(aktis)
.values({ ...akti, author: user.id! })