comparison src/mail/ngx_mail_handler.c @ 444:33394d1255b0 NGINX_0_7_34

nginx 0.7.34 *) Feature: the "off" parameter of the "if_modified_since" directive. *) Feature: now nginx sends an HELO/EHLO command after a XCLIENT command. Thanks to Maxim Dounin. *) Feature: Microsoft specific "AUTH LOGIN with User Name" mode support in mail proxy server. Thanks to Maxim Dounin. *) Bugfix: in a redirect rewrite directive original arguments were concatenated with new arguments by an "?" rather than an "&"; the bug had appeared in 0.1.18. Thanks to Maxim Dounin. *) Bugfix: nginx could not be built on AIX.
author Igor Sysoev <http://sysoev.ru>
date Tue, 10 Feb 2009 00:00:00 +0300
parents dac47e9ef0d5
children 6484cbba0222
comparison
equal deleted inserted replaced
443:28335b730750 444:33394d1255b0
354 return NGX_DONE; 354 return NGX_DONE;
355 } 355 }
356 356
357 357
358 ngx_int_t 358 ngx_int_t
359 ngx_mail_auth_login_username(ngx_mail_session_t *s, ngx_connection_t *c) 359 ngx_mail_auth_login_username(ngx_mail_session_t *s, ngx_connection_t *c,
360 ngx_uint_t n)
360 { 361 {
361 ngx_str_t *arg; 362 ngx_str_t *arg;
362 363
363 arg = s->args.elts; 364 arg = s->args.elts;
364 365
365 ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0, 366 ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0,
366 "mail auth login username: \"%V\"", &arg[0]); 367 "mail auth login username: \"%V\"", &arg[n]);
367 368
368 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));
369 if (s->login.data == NULL){ 370 if (s->login.data == NULL){
370 return NGX_ERROR; 371 return NGX_ERROR;
371 } 372 }
372 373
373 if (ngx_decode_base64(&s->login, &arg[0]) != NGX_OK) { 374 if (ngx_decode_base64(&s->login, &arg[n]) != NGX_OK) {
374 ngx_log_error(NGX_LOG_INFO, c->log, 0, 375 ngx_log_error(NGX_LOG_INFO, c->log, 0,
375 "client sent invalid base64 encoding in AUTH LOGIN command"); 376 "client sent invalid base64 encoding in AUTH LOGIN command");
376 return NGX_MAIL_PARSE_INVALID_COMMAND; 377 return NGX_MAIL_PARSE_INVALID_COMMAND;
377 } 378 }
378 379