239392b876
- lib/forum-sanitize.ts: cleanPostHtml con sanitize-html (misma allowlist que forum/sanitize.py de nh3: formato básico + a/img/tablas, rel nofollow, esquemas http/https/mailto). Verificado XSS-safe (script/onclick/javascript: eliminados). - lib/forum-write.ts: createTopic (tema + primer post), createPost (respuesta + updated_at), forumIsPostable / topicIsReplyable. - Routes /api/forum/topic y /api/forum/reply (guard de sesión; identidad = cuenta de juego: poster=username, poster_id=accountId). Componentes NewTopicForm y ReplyForm (clientes). Se muestran solo si hay sesión; el tema cerrado no admite respuesta. Verificado: escritura 401 sin sesión, saneado correcto. Pendiente: editar/borrar, moderación (fijar/cerrar/mover), búsqueda, editor enriquecido. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
36 lines
820 B
JSON
36 lines
820 B
JSON
{
|
|
"name": "web-next",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev -p 3001",
|
|
"build": "next build",
|
|
"start": "next start -p 3001",
|
|
"lint": "eslint"
|
|
},
|
|
"dependencies": {
|
|
"iron-session": "^8.0.4",
|
|
"mysql2": "^3.22.6",
|
|
"next": "16.2.10",
|
|
"next-intl": "^4.13.2",
|
|
"nodemailer": "^9.0.3",
|
|
"react": "19.2.4",
|
|
"react-dom": "19.2.4",
|
|
"sanitize-html": "^2.17.6",
|
|
"stripe": "^22.3.1"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/postcss": "^4.3.2",
|
|
"@types/node": "^20",
|
|
"@types/nodemailer": "^8.0.1",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"@types/sanitize-html": "^2.16.1",
|
|
"eslint": "^9",
|
|
"eslint-config-next": "16.2.10",
|
|
"tailwindcss": "^4.3.2",
|
|
"tsx": "^4.23.0",
|
|
"typescript": "^5"
|
|
}
|
|
}
|