comparison src/mail/ngx_mail_handler.c @ 484:c78a94ba4ae1

Merge with 0.7.34.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 11 Feb 2009 17:10:59 +0300
parents abbf48179d76 33394d1255b0
children 9773720b845e
comparison
equal deleted inserted replaced
481:abbf48179d76 484:c78a94ba4ae1
360 ngx_uint_t n) 360 ngx_uint_t n)
361 { 361 {
362 ngx_str_t *arg; 362 ngx_str_t *arg;
363 363
364 arg = s->args.elts; 364 arg = s->args.elts;
365 arg += n;
366 365
367 ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0, 366 ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0,
368 "mail auth login username: \"%V\"", &arg[0]); 367 "mail auth login username: \"%V\"", &arg[n]);
369 368
370 s->login.data = ngx_pnalloc(c->pool, ngx_base64_decoded_length(arg[0].len)); 369 s->login.data = ngx_pnalloc(c->pool, ngx_base64_decoded_length(arg[n].len));
371 if (s->login.data == NULL){ 370 if (s->login.data == NULL){
372 return NGX_ERROR; 371 return NGX_ERROR;
373 } 372 }
374 373
375 if (ngx_decode_base64(&s->login, &arg[0]) != NGX_OK) { 374 if (ngx_decode_base64(&s->login, &arg[n]) != NGX_OK) {
376 ngx_log_error(NGX_LOG_INFO, c->log, 0, 375 ngx_log_error(NGX_LOG_INFO, c->log, 0,
377 "client sent invalid base64 encoding in AUTH LOGIN command"); 376 "client sent invalid base64 encoding in AUTH LOGIN command");
378 return NGX_MAIL_PARSE_INVALID_COMMAND; 377 return NGX_MAIL_PARSE_INVALID_COMMAND;
379 } 378 }
380 379