Update Apache SSL configuration and enhance security features across multiple files. Changed X-Frame-Options to SAMEORIGIN for better security, added optional Content Security Policy headers for testing, and improved password handling with HaveIBeenPwned checks during user registration and password reset. Implemented passkey login functionality in the authentication flow, including UI updates for user experience. Enhanced image upload processing with size limits and validation, and added rate limiting for various API endpoints to prevent abuse.

This commit is contained in:
Torsten Schulz (local)
2026-01-05 11:50:57 +01:00
parent 51214c8964
commit 5ce064cff0
47 changed files with 1738 additions and 83 deletions

View File

@@ -4,6 +4,7 @@ import { promisify } from 'util'
import fs from 'fs/promises'
import path from 'path'
import { StandardFonts } from 'pdf-lib'
import { getDownloadCookieOptionsWithMaxAge } from '../../utils/cookies.js'
// const require = createRequire(import.meta.url) // Nicht verwendet
const execAsync = promisify(exec)
@@ -702,10 +703,7 @@ export default defineEventHandler(async (event) => {
// Download-Token setzen
const downloadToken = Buffer.from(`${filename}:${Date.now()}`).toString('base64')
setCookie(event, 'download_token', downloadToken, {
httpOnly: true,
secure: process.env.NODE_ENV === 'production',
sameSite: 'strict',
maxAge: 60 * 60 * 24 // 24 Stunden
...getDownloadCookieOptionsWithMaxAge(60 * 60 * 24)
})
return {
@@ -775,10 +773,7 @@ export default defineEventHandler(async (event) => {
// Download-Berechtigung für den Antragsteller setzen
const downloadToken = Buffer.from(`${filename}:${Date.now()}`).toString('base64')
setCookie(event, 'download_token', downloadToken, {
httpOnly: true,
secure: process.env.NODE_ENV === 'production',
sameSite: 'strict',
maxAge: 60 * 60 * 24 // 24 Stunden
...getDownloadCookieOptionsWithMaxAge(60 * 60 * 24)
})
return {