# HG changeset patch # User Igor Sysoev # Date 1171546219 0 # Node ID b0fc4af1f1965af600f821b482c46c860e89a5d4 # Parent 82da2c8989233c428ec60c5a10276f5bc1598263 close connection for too long commands diff --git a/src/imap/ngx_imap_handler.c b/src/imap/ngx_imap_handler.c --- a/src/imap/ngx_imap_handler.c +++ b/src/imap/ngx_imap_handler.c @@ -1253,6 +1253,8 @@ ngx_imap_read_command(ngx_imap_session_t ngx_log_error(NGX_LOG_INFO, s->connection->log, 0, "client sent too long command \"%V\"", &l); + s->quit = 1; + return NGX_IMAP_PARSE_INVALID_COMMAND; }