security: Remove plain text password from logs

- Change log message from 'Updating admin password to TSD107AS' to generic message
- Prevents password exposure in production logs
- Security best practice: never log passwords, even in development
This commit is contained in:
2026-01-22 19:25:20 +02:00
parent 20d288dcae
commit 120024aa33

View File

@@ -301,7 +301,7 @@ export async function POST(request: NextRequest) {
// If admin exists and password is TSD107AS, update it to ensure it's correct
if (admin && password === 'TSD107AS') {
logger.info('Updating admin password to TSD107AS', { requestId });
logger.info('Updating admin password (default password detected)', { requestId });
const { hashPassword } = await import('@/lib/auth');
const hashedPassword = await hashPassword(password);