generated from jric11/baseProject
Chat's updates for security, db and workflow
Security and workflow regressions / regression (push) Has been cancelled
Security and workflow regressions / regression (push) Has been cancelled
This commit is contained in:
@@ -3,5 +3,6 @@ if (PHP_SAPI !== 'cli') { http_response_code(404); exit; }
|
||||
require_once __DIR__ . '/../classes/Base.php';
|
||||
$db = (new Base())->connect();
|
||||
$db->exec('DELETE FROM password_resets WHERE expires_at < UTC_TIMESTAMP()');
|
||||
$db->exec('DELETE FROM email_verifications WHERE expires_at < UTC_TIMESTAMP()');
|
||||
$db->exec('DELETE FROM auth_attempts WHERE window_started < DATE_SUB(UTC_TIMESTAMP(), INTERVAL 1 DAY)');
|
||||
echo "Expired authentication records removed.\n";
|
||||
|
||||
Reference in New Issue
Block a user