diff options
| author | Horus3 | 2014-04-16 13:43:34 +0200 |
|---|---|---|
| committer | Horus3 | 2014-04-16 13:43:34 +0200 |
| commit | b70acc4bce1450a726cf50a2f2f09539d74252b0 (patch) | |
| tree | fd8b70beb7bbe57534137f3b19ea7c0f6fa0191a /blob | |
| parent | 3dc852b163daba5fa59499215f8b725a6f0a39eb (diff) | |
| download | files.iamfabulous.de-b70acc4bce1450a726cf50a2f2f09539d74252b0.tar.gz | |
Improved brutforce protection and added ban page.
Diffstat (limited to 'blob')
| -rwxr-xr-x | blob/database_schema | 2 | ||||
| -rwxr-xr-x | blob/nginx_rewrite_rules | 2 |
2 files changed, 3 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 e6783f0..1b65c16 100755 --- a/blob/nginx_rewrite_rules +++ b/blob/nginx_rewrite_rules @@ -11,6 +11,8 @@ location /robots.txt {} #stop rewriting the robots.txt location /favicon.ico {} location /static {} +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; } |
