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:
Alexey Sokolov
2025-02-15 00:01:29 +00:00
parent 4ef64eb4d5
commit 99a5a52fea
+4
View File
@@ -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();