[nginx] Mail: discard pipelined commands after SMTP STARTTLS.
Maxim Dounin
mdounin at mdounin.ru
Tue Aug 5 13:53:28 UTC 2014
details: http://hg.nginx.org/nginx/rev/4b8a54df08de
branches: stable-1.6
changeset: 5795:4b8a54df08de
user: Maxim Dounin <mdounin at mdounin.ru>
date: Tue Aug 05 12:22:07 2014 +0400
description:
Mail: discard pipelined commands after SMTP STARTTLS.
The bug had appeared in nginx 1.5.6 (04e43d03e153).
Reported by Chris Boulton.
diffstat:
src/mail/ngx_mail_smtp_handler.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diffs (13 lines):
diff --git a/src/mail/ngx_mail_smtp_handler.c b/src/mail/ngx_mail_smtp_handler.c
--- 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;
}
More information about the nginx-devel
mailing list