aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/develop
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-06-10 12:02:59 +0200
committerNils Adermann <naderman@naderman.de>2011-06-10 12:18:19 +0200
commit2dee57fd43ebe1cf1f43fb0161cdd5f072eeaa63 (patch)
tree3c50ada87cc79e7488cb68a57d52dd3494d985ed /phpBB/develop
parentfc9b12669145f72414eb45bbb73860099c6cecef (diff)
downloadforums-2dee57fd43ebe1cf1f43fb0161cdd5f072eeaa63.tar
forums-2dee57fd43ebe1cf1f43fb0161cdd5f072eeaa63.tar.gz
forums-2dee57fd43ebe1cf1f43fb0161cdd5f072eeaa63.tar.bz2
forums-2dee57fd43ebe1cf1f43fb0161cdd5f072eeaa63.tar.xz
forums-2dee57fd43ebe1cf1f43fb0161cdd5f072eeaa63.zip
[ticket/9992] Adding a limit on login attempts per IP.
A new table was created to save all failed login attempts with corresponding information on username, ip and useragent. By default the limit is 50 login attempts within 6 hours per IP. The limit is relatively high to avoid big problems on sites behind a reverse proxy that don't receive the forwarded-for value as REMOTE_ADDR but see all users as coming from the same IP address. But if these users run into problems a special forwarded-for option is available to limit logins by forwarded-for value instead of ip. PHPBB3-9992
Diffstat (limited to 'phpBB/develop')
-rw-r--r--phpBB/develop/create_schema_files.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index 87670722aa..f1e2858848 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -1207,6 +1207,26 @@ function get_schema_struct()
),
);
+ $schema_data['phpbb_login_attempts'] = array(
+ 'COLUMNS' => array(
+ 'attempt_id' => array('UINT', NULL, 'auto_increment'),
+ 'attempt_ip' => array('VCHAR:40', ''),
+ 'attempt_browser' => array('VCHAR:150', ''),
+ 'attempt_forwarded_for' => array('VCHAR:255', ''),
+ 'attempt_time' => array('TIMESTAMP', 0),
+ 'user_id' => array('UINT', 0),
+ 'username' => array('VCHAR_UNI:255', 0),
+ 'username_clean' => array('VCHAR_CI', 0),
+ ),
+ 'PRIMARY_KEY' => 'attempt_id',
+ 'KEYS' => array(
+ 'attempt_ip' => array('INDEX', array('attempt_ip', 'attempt_time')),
+ 'attempt_forwarded_for' => array('INDEX', array('attempt_forwarded_for', 'attempt_time')),
+ 'attempt_time' => array('INDEX', array('attempt_time')),
+ 'user_id' => array('INDEX', 'user_id'),
+ ),
+ );
+
$schema_data['phpbb_moderator_cache'] = array(
'COLUMNS' => array(
'forum_id' => array('UINT', 0),