comparison src/mail/ngx_mail_handler.c @ 582:c456a023113c NGINX_0_8_43

nginx 0.8.43 *) Feature: large geo ranges base loading speed-up. *) Bugfix: an error_page redirection to "location /zero { return 204; }" without changing status code kept the error body; the bug had appeared in 0.8.42. *) Bugfix: nginx might close IPv6 listen socket during reconfiguration. Thanks to Maxim Dounin. *) Bugfix: the $uid_set variable may be used at any request processing stage.
author Igor Sysoev <http://sysoev.ru>
date Wed, 30 Jun 2010 00:00:00 +0400
parents f0cac61857ae
children d0f7a625f27c
comparison
equal deleted inserted replaced
581:22b2345b75d9 582:c456a023113c
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,