wallabag/wallabag — pull request #690 by doc75 (2014-05-14 17:38:03+00:00)
Title: Add message in web server log in case of authentication failure

This patch add an error message in case of login failure attempt.
The purpose of this message is to enable the usage of fail2ban to block any brute force attack on the login page.

The fail2ban filter definition to take advantage of this log message (named apache-auth-wallabag.conf):
```ini
[INCLUDES]
before = apache-common.conf
[Definition]
failregex = ^%(_apache_error_client)s user .* (authentication failure|not found|password mismatch).*$
ignoreregex =
```
Anf the jail definition:
```ini
[apache-auth-custo]
enabled = true
port = http,https
filter = apache-auth-wallabag
logpath = /var/log/apache2/*error.log
maxretry = 1
```

Those examples are tested on Ubuntu.

**remark**: the change on line 1068 and after is only the automatic removal of ^M at the end of the line by my text editor.

This pull request is the rebase on dev branch of issue #688.