From 23f5c317197867107a75306b925bc6158e4bc416 Mon Sep 17 00:00:00 2001 From: Aaron Jones Date: Sun, 2 Oct 2016 14:13:02 +0000 Subject: [PATCH] SASL: Relax rate limiting for failures a little Begin at 8 seconds after 2 failures and up to ~4 minutes --- modules/m_sasl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/m_sasl.c b/modules/m_sasl.c index d6d7116c..80e21661 100644 --- a/modules/m_sasl.c +++ b/modules/m_sasl.c @@ -255,7 +255,7 @@ me_sasl(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_ * rate-limited immediately and not being able to login with SASL. */ if (target_p->localClient->sasl_failures++ > 0) - target_p->localClient->sasl_next_retry = rb_current_time() + (1 << MIN(target_p->localClient->sasl_failures + 5, 13)); + target_p->localClient->sasl_next_retry = rb_current_time() + (1 << MIN(target_p->localClient->sasl_failures + 1, 8)); } else if(throttle_add((struct sockaddr*)&target_p->localClient->ip)) {