mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-13 08:05:55 +01:00
2020-10-15 Fred Gleason <fredg@paravelsystems.com>
* Added a 'RDApplication::logAuthenticationFailure()' method. * Added a sample Fail2Ban jail filter for the WebAPI in 'conf/rivendell-webapi.conf'. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -312,6 +312,21 @@ void RDApplication::addTempFile(const QString &pathname)
|
||||
}
|
||||
|
||||
|
||||
void RDApplication::logAuthenticationFailure(const QHostAddress &orig_addr,
|
||||
const QString &login_name)
|
||||
{
|
||||
if(login_name.isEmpty()) {
|
||||
syslog(LOG_NOTICE,"failed WebAPI login from %s",
|
||||
orig_addr.toString().toUtf8().constData());
|
||||
}
|
||||
else {
|
||||
syslog(LOG_NOTICE,"failed WebAPI login from %s for user \"%s\"",
|
||||
orig_addr.toString().toUtf8().constData(),
|
||||
login_name.toUtf8().constData());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RDApplication::syslog(int priority,const char *fmt,...) const
|
||||
{
|
||||
va_list args;
|
||||
|
||||
Reference in New Issue
Block a user