Konfliktauflösung kombiniert beide Seiten: - Auth: Secure-Cookie-Flag + DB-Session-Handler (main) - UniFiController: createVouchers (n-Parameter, 1 API-Call) + QoS-Optionen (main) - index.php: IP-Rate-Limit/PRG/Sticky-Forms + CAPTCHA/SMS/QoS/Tageslimit (main) - users.php: 2FA-Reset (main) auf POST+PRG umgestellt wie übrige Aktionen - forgot_password: Session-Throttle (main) + IP-Throttle kombiniert - Eigene Migrationen wegen Nummernkollision auf 0005/0006 umbenannt https://claude.ai/code/session_01KKVpVPJjrTKGoRgpJcySD4
11 lines
542 B
SQL
11 lines
542 B
SQL
-- IP-basiertes Request-Throttling (z.B. anonyme Voucher-Erstellung,
|
|
-- Passwort-Reset-Anfragen). Ersetzt das rein session-basierte Throttling,
|
|
-- das sich per Cookie-Loeschen umgehen liess.
|
|
CREATE TABLE IF NOT EXISTS `request_throttle` (
|
|
`id` INT PRIMARY KEY AUTO_INCREMENT,
|
|
`ip_address` VARCHAR(45) NOT NULL,
|
|
`action` VARCHAR(50) NOT NULL,
|
|
`weight` INT NOT NULL DEFAULT 1,
|
|
`requested_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
INDEX `idx_throttle` (`action`, `ip_address`, `requested_at`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|