changeset 1494:6535fb51976a

fix "AUTH PLAIN [initial-response]" bug introduced in r1477
author Igor Sysoev <igor@sysoev.ru>
date Fri, 21 Sep 2007 14:08:50 +0000
parents 3c4111e07b58
children 5557460a7247
files src/mail/ngx_mail_handler.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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 *
         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;