aboutsummaryrefslogtreecommitdiff
path: root/src/mail/ngx_mail_handler.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-02-09 12:03:55 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-02-09 12:03:55 +0000
commit09f6cd5fa930eb22ace086ecb71571ffb5071080 (patch)
tree0547b237023d4318560184267baf5fa8f182b0ff /src/mail/ngx_mail_handler.c
parent9f751a8324d6a241b33d76be65a1435a1f56f0d6 (diff)
downloadnginx-09f6cd5fa930eb22ace086ecb71571ffb5071080.tar.gz
nginx-09f6cd5fa930eb22ace086ecb71571ffb5071080.zip
compatibility with Microsoft's
AUTH LOGIN [base64 encoded user name ] patch by Maxim Dounin
Diffstat (limited to 'src/mail/ngx_mail_handler.c')
-rw-r--r--src/mail/ngx_mail_handler.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mail/ngx_mail_handler.c b/src/mail/ngx_mail_handler.c
index e86877f1a..0863d6dfe 100644
--- a/src/mail/ngx_mail_handler.c
+++ b/src/mail/ngx_mail_handler.c
@@ -356,21 +356,22 @@ ngx_mail_auth_plain(ngx_mail_session_t *s, ngx_connection_t *c, ngx_uint_t n)
ngx_int_t
-ngx_mail_auth_login_username(ngx_mail_session_t *s, ngx_connection_t *c)
+ngx_mail_auth_login_username(ngx_mail_session_t *s, ngx_connection_t *c,
+ ngx_uint_t n)
{
ngx_str_t *arg;
arg = s->args.elts;
ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0,
- "mail auth login username: \"%V\"", &arg[0]);
+ "mail auth login username: \"%V\"", &arg[n]);
- s->login.data = ngx_pnalloc(c->pool, ngx_base64_decoded_length(arg[0].len));
+ s->login.data = ngx_pnalloc(c->pool, ngx_base64_decoded_length(arg[n].len));
if (s->login.data == NULL){
return NGX_ERROR;
}
- if (ngx_decode_base64(&s->login, &arg[0]) != NGX_OK) {
+ if (ngx_decode_base64(&s->login, &arg[n]) != NGX_OK) {
ngx_log_error(NGX_LOG_INFO, c->log, 0,
"client sent invalid base64 encoding in AUTH LOGIN command");
return NGX_MAIL_PARSE_INVALID_COMMAND;