[nginx] Mail: discard pipelined commands after SMTP STARTTLS.
Maxim Dounin
mdounin at mdounin.ru
Tue Aug 5 13:52:02 UTC 2014
details: http://hg.nginx.org/nginx/rev/3f5d0af4e40a
branches:
changeset: 5787:3f5d0af4e40a
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