From e3f6cb85a0c8e5f4837c2e261b47f143e69975f7 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 21 Sep 2007 14:08:50 +0000 Subject: [PATCH] fix "AUTH PLAIN [initial-response]" bug introduced in r1477 --- src/mail/ngx_mail_handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mail/ngx_mail_handler.c b/src/mail/ngx_mail_handler.c index d4082da87..e4985d3d2 100644 --- a/src/mail/ngx_mail_handler.c +++ b/src/mail/ngx_mail_handler.c @@ -295,7 +295,7 @@ ngx_mail_auth_plain(ngx_mail_session_t *s, ngx_connection_t *c, ngx_uint_t n) return NGX_ERROR; } - if (ngx_decode_base64(&plain, &arg[0]) != NGX_OK) { + if (ngx_decode_base64(&plain, &arg[n]) != NGX_OK) { ngx_log_error(NGX_LOG_INFO, c->log, 0, "client sent invalid base64 encoding in AUTH PLAIN command"); return NGX_MAIL_PARSE_INVALID_COMMAND;