comparison src/mail/ngx_mail_handler.c @ 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 93ff27726d2e
children e584e946e198
comparison
equal deleted inserted replaced
1493:3c4111e07b58 1494:6535fb51976a
293 plain.data = ngx_palloc(c->pool, ngx_base64_decoded_length(arg[n].len)); 293 plain.data = ngx_palloc(c->pool, ngx_base64_decoded_length(arg[n].len));
294 if (plain.data == NULL){ 294 if (plain.data == NULL){
295 return NGX_ERROR; 295 return NGX_ERROR;
296 } 296 }
297 297
298 if (ngx_decode_base64(&plain, &arg[0]) != NGX_OK) { 298 if (ngx_decode_base64(&plain, &arg[n]) != NGX_OK) {
299 ngx_log_error(NGX_LOG_INFO, c->log, 0, 299 ngx_log_error(NGX_LOG_INFO, c->log, 0,
300 "client sent invalid base64 encoding in AUTH PLAIN command"); 300 "client sent invalid base64 encoding in AUTH PLAIN command");
301 return NGX_MAIL_PARSE_INVALID_COMMAND; 301 return NGX_MAIL_PARSE_INVALID_COMMAND;
302 } 302 }
303 303