dovecot-2.2: pop3-login: Disconnect client on 3rd invalid comman...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Mar 5 23:02:07 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/2589f9c5cc04
changeset: 18295:2589f9c5cc04
user: Timo Sirainen <tss at iki.fi>
date: Fri Mar 06 01:01:28 2015 +0200
description:
pop3-login: Disconnect client on 3rd invalid command (not 11th).
diffstat:
src/pop3-login/client.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r 91852459f388 -r 2589f9c5cc04 src/pop3-login/client.c
--- a/src/pop3-login/client.c Fri Mar 06 00:41:14 2015 +0200
+++ b/src/pop3-login/client.c Fri Mar 06 01:01:28 2015 +0200
@@ -20,7 +20,7 @@
#include "pop3-login-settings.h"
/* Disconnect client when it sends too many bad commands */
-#define CLIENT_MAX_BAD_COMMANDS 10
+#define CLIENT_MAX_BAD_COMMANDS 3
static bool cmd_stls(struct pop3_client *client)
{
@@ -130,7 +130,7 @@
if (client_command_execute(pop3_client, line,
args != NULL ? args : ""))
client->bad_counter = 0;
- else if (++client->bad_counter > CLIENT_MAX_BAD_COMMANDS) {
+ else if (++client->bad_counter >= CLIENT_MAX_BAD_COMMANDS) {
client_send_reply(client, POP3_CMD_REPLY_ERROR,
"Too many invalid bad commands.");
client_destroy(client,
More information about the dovecot-cvs
mailing list