comparison src/mail/ngx_mail_handler.c @ 665:0b460e61bdcd default tip

Merge with nginx 1.0.0.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 25 Apr 2011 04:22:17 +0400
parents 9773720b845e c456a023113c
children
comparison
equal deleted inserted replaced
572:06419a2298a9 665:0b460e61bdcd
344 ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0, 344 ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0,
345 "mail auth plain: \"%V\"", &arg[n]); 345 "mail auth plain: \"%V\"", &arg[n]);
346 #endif 346 #endif
347 347
348 plain.data = ngx_pnalloc(c->pool, ngx_base64_decoded_length(arg[n].len)); 348 plain.data = ngx_pnalloc(c->pool, ngx_base64_decoded_length(arg[n].len));
349 if (plain.data == NULL){ 349 if (plain.data == NULL) {
350 return NGX_ERROR; 350 return NGX_ERROR;
351 } 351 }
352 352
353 if (ngx_decode_base64(&plain, &arg[n]) != NGX_OK) { 353 if (ngx_decode_base64(&plain, &arg[n]) != NGX_OK) {
354 ngx_log_error(NGX_LOG_INFO, c->log, 0, 354 ngx_log_error(NGX_LOG_INFO, c->log, 0,
401 401
402 ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0, 402 ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0,
403 "mail auth login username: \"%V\"", &arg[n]); 403 "mail auth login username: \"%V\"", &arg[n]);
404 404
405 s->login.data = ngx_pnalloc(c->pool, ngx_base64_decoded_length(arg[n].len)); 405 s->login.data = ngx_pnalloc(c->pool, ngx_base64_decoded_length(arg[n].len));
406 if (s->login.data == NULL){ 406 if (s->login.data == NULL) {
407 return NGX_ERROR; 407 return NGX_ERROR;
408 } 408 }
409 409
410 if (ngx_decode_base64(&s->login, &arg[n]) != NGX_OK) { 410 if (ngx_decode_base64(&s->login, &arg[n]) != NGX_OK) {
411 ngx_log_error(NGX_LOG_INFO, c->log, 0, 411 ngx_log_error(NGX_LOG_INFO, c->log, 0,
432 "mail auth login password: \"%V\"", &arg[0]); 432 "mail auth login password: \"%V\"", &arg[0]);
433 #endif 433 #endif
434 434
435 s->passwd.data = ngx_pnalloc(c->pool, 435 s->passwd.data = ngx_pnalloc(c->pool,
436 ngx_base64_decoded_length(arg[0].len)); 436 ngx_base64_decoded_length(arg[0].len));
437 if (s->passwd.data == NULL){ 437 if (s->passwd.data == NULL) {
438 return NGX_ERROR; 438 return NGX_ERROR;
439 } 439 }
440 440
441 if (ngx_decode_base64(&s->passwd, &arg[0]) != NGX_OK) { 441 if (ngx_decode_base64(&s->passwd, &arg[0]) != NGX_OK) {
442 ngx_log_error(NGX_LOG_INFO, c->log, 0, 442 ngx_log_error(NGX_LOG_INFO, c->log, 0,
492 492
493 ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0, 493 ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0,
494 "mail auth cram-md5: \"%V\"", &arg[0]); 494 "mail auth cram-md5: \"%V\"", &arg[0]);
495 495
496 s->login.data = ngx_pnalloc(c->pool, ngx_base64_decoded_length(arg[0].len)); 496 s->login.data = ngx_pnalloc(c->pool, ngx_base64_decoded_length(arg[0].len));
497 if (s->login.data == NULL){ 497 if (s->login.data == NULL) {
498 return NGX_ERROR; 498 return NGX_ERROR;
499 } 499 }
500 500
501 if (ngx_decode_base64(&s->login, &arg[0]) != NGX_OK) { 501 if (ngx_decode_base64(&s->login, &arg[0]) != NGX_OK) {
502 ngx_log_error(NGX_LOG_INFO, c->log, 0, 502 ngx_log_error(NGX_LOG_INFO, c->log, 0,