From d0b69892ea158cd372f2bf0673d759db10a8ceb2 Mon Sep 17 00:00:00 2001 From: Adrian Bonpin Date: Fri, 15 May 2026 00:48:27 +0800 Subject: [PATCH] feat(security): add input sanitization to strip script tags and javascript: URLs from comments --- lib/api/comments.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/lib/api/comments.ts b/lib/api/comments.ts index 7ef6cc5..ef3a81a 100644 --- a/lib/api/comments.ts +++ b/lib/api/comments.ts @@ -184,13 +184,32 @@ export const commentsRoutes = new Elysia({ } } + // ── Sanitize: strip