summaryrefslogtreecommitdiff
path: root/blob
diff options
context:
space:
mode:
Diffstat (limited to 'blob')
-rwxr-xr-xblob/database_schema2
-rwxr-xr-xblob/nginx_rewrite_rules1
2 files changed, 2 insertions, 1 deletions
diff --git a/blob/database_schema b/blob/database_schema
index c994910..d2bf0cf 100755
--- a/blob/database_schema
+++ b/blob/database_schema
@@ -6,6 +6,6 @@ CREATE TABLE IF NOT EXISTS files (id INTEGER PRIMARY KEY, parent INTEGER, owner
CREATE TABLE IF NOT EXISTS log (id INTEGER PRIMARY KEY, user INTEGER, login TEXT, FOREIGN KEY(user) REFERENCES user(id));
-CREATE TABLE IF NOT EXISTS banned_user (id INTEGER PRIMARY KEY, ip TEXT, session_id TEXT, time INTEGER);
+CREATE TABLE IF NOT EXISTS banned_user (id INTEGER PRIMARY KEY, login_attempts, ip TEXT, session_id TEXT, time INTEGER, user INTEGER);
CREATE TRIGGER IF NOT EXISTS delete_files AFTER DELETE ON user FOR EACH ROW BEGIN DELETE FROM files WHERE owner=OLD.id; END;
diff --git a/blob/nginx_rewrite_rules b/blob/nginx_rewrite_rules
index 2c9b7f3..e276bcf 100755
--- a/blob/nginx_rewrite_rules
+++ b/blob/nginx_rewrite_rules
@@ -12,6 +12,7 @@ location /favicon.ico {}
location /static {}
try_files $uri @main;
+rewrite ^/banned$ /httperror.php?e=ban;
location ~* ^/login/?([a-z0-9]+=[a-z0-9]+(&[a-z0-9]+=[a-z0-9]+)?)?$ {
rewrite ^/?login([?/]?.*) /index.php?task=login&arguments=$1 last;