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