Security Hardening: Proaktive Kontosperren, Fail2Ban-Integration, SecurityLogger, Alerting und API-Schutz

This commit is contained in:
Deploymentcenter Bot
2026-09-08 11:45:04 +02:00
parent 087f4392a9
commit edea46e342
17 changed files with 927 additions and 169 deletions
+9 -1
View File
@@ -358,10 +358,18 @@ switch ($action) {
Http::ok(['cleared' => true]);
break;
// ------------------------------------------------------------------
case 'unlock_user':
$username = (string)(Http::str('username') ?? 'admin');
$stmt = $db->prepare('UPDATE dc_users SET failed_login_count = 0, locked_until = NULL WHERE username = :u');
$stmt->execute([':u' => $username]);
Http::ok(['unlocked' => $username, 'affected' => $stmt->rowCount()]);
break;
// ------------------------------------------------------------------
default:
Http::fail(400, 'unknown_action', sprintf('Unbekannte Aktion "%s".', $action), null, [
'actions' => ['status', 'wipe', 'migrate', 'reset', 'workbench_token',
'update_master_token', 'genkey', 'log', 'clearlog'],
'update_master_token', 'genkey', 'log', 'clearlog', 'unlock_user'],
]);
}