# HG changeset patch # User Igor Sysoev # Date 1190383730 0 # Node ID 6535fb51976ada311bff09e7452123bccaa7f14b # Parent 3c4111e07b58ebd2778effce8263ba8084becc95 fix "AUTH PLAIN [initial-response]" bug introduced in r1477 diff --git a/src/mail/ngx_mail_handler.c b/src/mail/ngx_mail_handler.c --- 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;