forked from wallabag/wallabag
Log an error level message when user auth fail
When a user login using the form we know log an error level information with information about the user: - username used - IP - User agent For example: > Authentication failure for user "eza", from IP "127.0.0.1", with UA: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36". It’ll allows server admin using fail2ban to configure it to block these people if they generate too much failure authentication.
This commit is contained in:
@ -35,3 +35,11 @@ services:
|
||||
- "%wallabag_core.list_mode%"
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
wallabag_user.security.custom_auth_failure_handler:
|
||||
class: Wallabag\UserBundle\Security\CustomAuthenticationFailureHandler
|
||||
arguments:
|
||||
- "@http_kernel"
|
||||
- "@security.http_utils"
|
||||
- { }
|
||||
- "@logger"
|
||||
|
||||
Reference in New Issue
Block a user