summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Subscriber/AuthSubscriber.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/Subscriber/AuthSubscriber.php b/app/Subscriber/AuthSubscriber.php
index 5f22edab..3f6ad05a 100644
--- a/app/Subscriber/AuthSubscriber.php
+++ b/app/Subscriber/AuthSubscriber.php
@@ -97,11 +97,17 @@ class AuthSubscriber extends BaseSubscriber implements EventSubscriberInterface
$username = $event->getUsername();
if (! empty($username)) {
+ // log login failure in web server log to allow fail2ban usage
+ error_log('Kanboard: user '.$username.' authentication failure');
$this->userLockingModel->incrementFailedLogin($username);
if ($this->userLockingModel->getFailedLogin($username) > BRUTEFORCE_LOCKDOWN) {
$this->userLockingModel->lock($username, BRUTEFORCE_LOCKDOWN_DURATION);
}
}
+ else {
+ // log login failure in web server log to allow fail2ban usage
+ error_log('Kanboard: user Unknown authentication failure');
+ }
}
}