Mail: discard pipelined commands after SMTP STARTTLS.

The bug had appeared in nginx 1.5.6 (04e43d03e153).

Reported by Chris Boulton.
This commit is contained in:
Maxim Dounin 2014-08-05 12:22:07 +04:00
parent 39bac43204
commit 3d1275bdbd
1 changed files with 3 additions and 0 deletions

View File

@ -777,6 +777,9 @@ ngx_mail_smtp_starttls(ngx_mail_session_t *s, ngx_connection_t *c)
ngx_str_null(&s->smtp_from);
ngx_str_null(&s->smtp_to);
s->buffer->pos = s->buffer->start;
s->buffer->last = s->buffer->start;
c->read->handler = ngx_mail_starttls_handler;
return NGX_OK;
}