diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2009-05-18 15:58:46 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2009-05-18 15:58:46 +0000 |
| commit | 6e574b051840946aedbdda548f2b0e4bd54f4b9c (patch) | |
| tree | a14c634355af29268fda21e6697c4caa5755fa38 /src/mail/ngx_mail_handler.c | |
| parent | a948e1f3216cd529eefd11fb4548b3dcb16d9178 (diff) | |
| download | nginx-6e574b051840946aedbdda548f2b0e4bd54f4b9c.tar.gz nginx-6e574b051840946aedbdda548f2b0e4bd54f4b9c.tar.bz2 | |
r2496, r2749 merge:
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.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mail/ngx_mail_handler.c b/src/mail/ngx_mail_handler.c index 0cb67a237..6b514972d 100644 --- a/src/mail/ngx_mail_handler.c +++ b/src/mail/ngx_mail_handler.c @@ -335,21 +335,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_palloc(c->pool, ngx_base64_decoded_length(arg[0].len)); + s->login.data = ngx_palloc(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; |
