Mercurial > hg > nginx-quic
diff src/mail/ngx_mail_smtp_handler.c @ 5795:4b8a54df08de stable-1.6
Mail: discard pipelined commands after SMTP STARTTLS.
The bug had appeared in nginx 1.5.6 (04e43d03e153).
Reported by Chris Boulton.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 05 Aug 2014 12:22:07 +0400 |
parents | d68cd5070f3d |
children | 2cd019520210 |
line wrap: on
line diff
--- a/src/mail/ngx_mail_smtp_handler.c +++ b/src/mail/ngx_mail_smtp_handler.c @@ -777,6 +777,9 @@ ngx_mail_smtp_starttls(ngx_mail_session_ 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; }