mirror of
https://github.com/znc/znc.git
synced 2026-08-04 16:03:25 +02:00
fail2ban: Reset the counter upon successful login
This is for SASL: when multiple mechanisms available it's kinda expected that some of them can fail, e.g. if client attempted EXTERNAL without providing the cert first.
This commit is contained in:
@@ -216,6 +216,10 @@ class CFailToBanMod : public CModule {
|
||||
Add(sRemoteIP, 1);
|
||||
}
|
||||
|
||||
void OnClientLogin() override {
|
||||
Remove(GetClient()->GetRemoteIP());
|
||||
}
|
||||
|
||||
EModRet OnLoginAttempt(std::shared_ptr<CAuthBase> Auth) override {
|
||||
// e.g. webadmin ends up here
|
||||
const CString& sRemoteIP = Auth->GetRemoteIP();
|
||||
|
||||
Reference in New Issue
Block a user