mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-12 07:35: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:
@@ -365,15 +365,18 @@ bool MainObject::Authenticate()
|
||||
QString passwd;
|
||||
|
||||
if(!webget_post->getValue("LOGIN_NAME",&name)) {
|
||||
rda->logAuthenticationFailure(webget_post->clientAddress());
|
||||
return false;
|
||||
}
|
||||
if(!webget_post->getValue("PASSWORD",&passwd)) {
|
||||
rda->logAuthenticationFailure(webget_post->clientAddress(),name);
|
||||
return false;
|
||||
}
|
||||
RDUser *user=new RDUser(name);
|
||||
if((!user->exists())||
|
||||
(!user->checkPassword(passwd,false))||
|
||||
(!user->webgetLogin())) {
|
||||
rda->logAuthenticationFailure(webget_post->clientAddress(),name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user