Loads the ratelimiter class and fixes typos
parent
a076c28a30
commit
8f32a79d0e
|
@ -22,8 +22,7 @@ class RateLimiter {
|
|||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
ip_address TEXT NOT NULL,
|
||||
username TEXT NOT NULL,
|
||||
attempted_at TEXT DEFAULT (DATETIME('now')),
|
||||
INDEX idx_ip_username (ip_address, username)
|
||||
attempted_at TEXT DEFAULT (DATETIME('now'))
|
||||
)";
|
||||
$this->db->exec($sql);
|
||||
|
|
@ -33,7 +33,6 @@ CREATE TABLE login_attempts (
|
|||
username TEXT NOT NULL,
|
||||
attempted_at TEXT DEFAULT (DATETIME('now')),
|
||||
);
|
||||
CREATE INDEX idx_ip_username ON login_attempts (ip_address, username);
|
||||
|
||||
CREATE TABLE ip_whitelist (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
|
|
|
@ -111,6 +111,9 @@ include '../app/helpers/logs.php';
|
|||
$logObject = new Log($dbWeb);
|
||||
$user_IP = getUserIP();
|
||||
|
||||
// init rate limiter
|
||||
require '../app/classes/ratelimiter.php';
|
||||
|
||||
// get platforms details
|
||||
require '../app/classes/platform.php';
|
||||
$platformObject = new Platform($dbWeb);
|
||||
|
|
Loading…
Reference in New Issue