Steuerkram/migrations/086_login_throttle.sql

8 lines
388 B
SQL

-- 086_login_throttle.sql
-- Fix #122: Brute-Force-Schutz für /login.
-- Fehlversuche pro Benutzername zählen und Konto nach zu vielen
-- Fehlversuchen für ein steigendes Zeitfenster sperren.
ALTER TABLE users
ADD COLUMN IF NOT EXISTS failed_attempts INT NOT NULL DEFAULT 0 AFTER active,
ADD COLUMN IF NOT EXISTS locked_until DATETIME NULL DEFAULT NULL AFTER failed_attempts;