summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery_event.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-02-02 21:48:01 -0800
committerBharat Mediratta <bharat@menalto.com>2010-02-02 21:48:01 -0800
commit99a7f470b93d35717f8d5979d05da6cf05a1dd20 (patch)
treeb6f9cd28d834ec665551909815658d65618b0aa1 /modules/gallery/helpers/gallery_event.php
parent6e1b761b12e13566875804c33efe2ae130ffa32e (diff)
Protect password changes against brute force attacks.
Diffstat (limited to 'modules/gallery/helpers/gallery_event.php')
-rw-r--r--modules/gallery/helpers/gallery_event.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php
index 6479e2c3..7b538c49 100644
--- a/modules/gallery/helpers/gallery_event.php
+++ b/modules/gallery/helpers/gallery_event.php
@@ -110,11 +110,19 @@ class gallery_event_Core {
graphics::choose_default_toolkit();
module::clear_var("gallery", "choose_default_tookit");
}
- auth::record_successful_login($user);
+ auth::clear_failed_auth_attempts($user);
}
static function user_login_failed($name) {
- auth::record_failed_login($name);
+ auth::record_failed_auth_attempts($name);
+ }
+
+ static function user_password_changed($user) {
+ auth::clear_failed_auth_attempts($user);
+ }
+
+ static function user_password_change_failed($name) {
+ auth::record_failed_auth_attempts($name);
}
static function item_index_data($item, $data) {