feat: Website-Rework mit verbessertem Design, Sicherheit und Deployment

- Neue About/Skills-Sektion hinzugefügt
- Verbesserte UI/UX für alle Komponenten
- Enhanced Contact Form mit Validierung
- Verbesserte Security Headers und Middleware
- Sichere Deployment-Skripte (safe-deploy.sh)
- Zero-Downtime Deployment Support
- Verbesserte Docker-Sicherheit
- Umfassende Sicherheits-Dokumentation
- Performance-Optimierungen
- Accessibility-Verbesserungen
This commit is contained in:
2025-11-22 19:24:49 +01:00
parent 498bec6edf
commit 976a6360fd
17 changed files with 1585 additions and 139 deletions

View File

@@ -40,11 +40,16 @@ export async function POST(request: NextRequest) {
const adminAuth = process.env.ADMIN_BASIC_AUTH || 'admin:default_password_change_me';
const [, expectedPassword] = adminAuth.split(':');
// Secure password comparison
if (password === expectedPassword) {
// Secure password comparison using constant-time comparison
const crypto = await import('crypto');
const passwordBuffer = Buffer.from(password, 'utf8');
const expectedBuffer = Buffer.from(expectedPassword, 'utf8');
// Use constant-time comparison to prevent timing attacks
if (passwordBuffer.length === expectedBuffer.length &&
crypto.timingSafeEqual(passwordBuffer, expectedBuffer)) {
// Generate cryptographically secure session token
const timestamp = Date.now();
const crypto = await import('crypto');
const randomBytes = crypto.randomBytes(32);
const randomString = randomBytes.toString('hex');
@@ -56,9 +61,9 @@ export async function POST(request: NextRequest) {
userAgent: request.headers.get('user-agent') || 'unknown'
};
// Encrypt session data
// Encode session data (base64 is sufficient for this use case)
const sessionJson = JSON.stringify(sessionData);
const sessionToken = btoa(sessionJson);
const sessionToken = Buffer.from(sessionJson).toString('base64');
return new NextResponse(
JSON.stringify({