Harden auth, payments, and frontend against review findings.

Close exploitable gaps in booking/payment flows, enforce token versioning and account checks, gate sensitive payment data, and add middleware plus input validation across admin routes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Michilis
2026-06-24 19:59:02 +00:00
co-authored by Cursor
parent fc4af38e8a
commit a6840ea953
37 changed files with 1432 additions and 528 deletions
@@ -14,11 +14,18 @@ interface RichTextEditorProps {
editable?: boolean;
}
// Escape HTML-significant characters so any raw HTML embedded in the markdown source
// is neutralised before we layer our own generated tags on top (defense-in-depth;
// the public renderer escapes too, and TipTap sanitizes via its schema).
function escapeRawHtml(s: string): string {
return s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
}
// Convert markdown to HTML for TipTap
function markdownToHtml(markdown: string): string {
if (!markdown) return '<p></p>';
let html = markdown;
let html = escapeRawHtml(markdown);
// Convert horizontal rules first (before other processing)
html = html.replace(/^---+$/gm, '<hr>');