From 1b271801c3e9b1464a24c2ab3e104b7b2fb530a6 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 18 May 2009 16:31:31 +0000 Subject: Changes with nginx 0.6.37 18 May 2009 *) Feature: Microsoft specific "AUTH LOGIN with User Name" mode support in mail proxy server. Thanks to Maxim Dounin. *) Bugfix: nginx could not be built on platforms different from i386, amd64, sparc, and ppc; the bug had appeared in 0.6.36. --- src/mail/ngx_mail_handler.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/mail/ngx_mail_handler.c') diff --git a/src/mail/ngx_mail_handler.c b/src/mail/ngx_mail_handler.c index 0cb67a237..6b514972d 100644 --- a/src/mail/ngx_mail_handler.c +++ b/src/mail/ngx_mail_handler.c @@ -335,21 +335,22 @@ ngx_mail_auth_plain(ngx_mail_session_t *s, ngx_connection_t *c, ngx_uint_t n) ngx_int_t -ngx_mail_auth_login_username(ngx_mail_session_t *s, ngx_connection_t *c) +ngx_mail_auth_login_username(ngx_mail_session_t *s, ngx_connection_t *c, + ngx_uint_t n) { ngx_str_t *arg; arg = s->args.elts; ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0, - "mail auth login username: \"%V\"", &arg[0]); + "mail auth login username: \"%V\"", &arg[n]); - s->login.data = ngx_palloc(c->pool, ngx_base64_decoded_length(arg[0].len)); + s->login.data = ngx_palloc(c->pool, ngx_base64_decoded_length(arg[n].len)); if (s->login.data == NULL){ return NGX_ERROR; } - if (ngx_decode_base64(&s->login, &arg[0]) != NGX_OK) { + if (ngx_decode_base64(&s->login, &arg[n]) != NGX_OK) { ngx_log_error(NGX_LOG_INFO, c->log, 0, "client sent invalid base64 encoding in AUTH LOGIN command"); return NGX_MAIL_PARSE_INVALID_COMMAND; -- cgit v1.2.1