diff options
author | Yorhel <git@yorhel.nl> | 2014-08-29 10:54:36 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2014-08-29 10:54:36 +0200 |
commit | 9a1bd46a568094ff62cfc85bc488b116042718b8 (patch) | |
tree | e580afad4f318a1c5f4c98047beaa6796b3f14e3 /lib/Multi | |
parent | c27d4e6b509a655d81e36469bb881afc287596e8 (diff) |
Throttle failed login attempts (10/day)
Diffstat (limited to 'lib/Multi')
-rw-r--r-- | lib/Multi/Maintenance.pm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/Multi/Maintenance.pm b/lib/Multi/Maintenance.pm index f94e2734..32af16ae 100644 --- a/lib/Multi/Maintenance.pm +++ b/lib/Multi/Maintenance.pm @@ -18,13 +18,13 @@ sub spawn { package_states => [ $p => [qw| _start shutdown set_daily daily set_monthly monthly log_stats - vncache_inc tagcache traitcache vnpopularity vnrating cleangraphs cleansessions cleannotifications rmuncomfirmusers + vncache_inc tagcache traitcache vnpopularity vnrating cleangraphs cleansessions cleannotifications rmuncomfirmusers cleanthrottle vncache_full usercache statscache logrotate vnsearch_check vnsearch_gettitles vnsearch_update |], ], heap => { - daily => [qw|vncache_inc tagcache traitcache vnpopularity vnrating cleangraphs cleansessions cleannotifications rmuncomfirmusers|], + daily => [qw|vncache_inc tagcache traitcache vnpopularity vnrating cleangraphs cleansessions cleannotifications rmuncomfirmusers cleanthrottle|], monthly => [qw|vncache_full usercache statscache logrotate|], vnsearch_checkdelay => 3600, @_, @@ -181,6 +181,13 @@ sub rmuncomfirmusers { } +sub cleanthrottle { + $_[KERNEL]->post(pg => do => + q|DELETE FROM login_throttle WHERE timeout < ?|, + [ time ], 'log_stats', 'cleanthrottle'); +} + + # # M O N T H L Y J O B S |