feat: implement full authentication system with CSRF protection and email verification flow
All checks were successful
Build and Push App / build (push) Successful in 5m59s

This commit is contained in:
2026-04-30 23:46:34 +02:00
parent 4e881bcbe6
commit 9c003d1b7d
21 changed files with 762 additions and 19 deletions

17
lib/sanitize.ts Normal file
View File

@@ -0,0 +1,17 @@
import DOMPurify from 'isomorphic-dompurify';
/**
* Sanitizes HTML content to prevent XSS attacks.
* Use this before passing content to dangerouslySetInnerHTML.
*/
export function sanitizeHTML(html: string): string {
return DOMPurify.sanitize(html, {
USE_PROFILES: { html: true },
ALLOWED_TAGS: [
'p', 'br', 'b', 'i', 'em', 'strong', 'a', 'ul', 'ol', 'li',
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'span', 'div',
'img', 'table', 'thead', 'tbody', 'tr', 'th', 'td'
],
ALLOWED_ATTR: ['href', 'target', 'rel', 'src', 'alt', 'class', 'style']
});
}