Mercurial > hg > nginx
comparison src/mail/ngx_mail_handler.c @ 9288:f83cb031a4a4
Mail: fixed EXTERNAL auth to clear s->passwd.
The s->passwd field might be set after previous (failed) authentication
in the same session, and since EXTERNAL authentication did not touch it,
it was sent to the auth server.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 03 Jun 2024 18:03:07 +0300 |
parents | d9a52ebb9b00 |
children | 4538c1ffb0f8 |
comparison
equal
deleted
inserted
replaced
9287:32d4582c484d | 9288:f83cb031a4a4 |
---|---|
742 } | 742 } |
743 | 743 |
744 s->login.len = external.len; | 744 s->login.len = external.len; |
745 s->login.data = external.data; | 745 s->login.data = external.data; |
746 | 746 |
747 ngx_str_null(&s->passwd); | |
748 | |
747 ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0, | 749 ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0, |
748 "mail auth external: \"%V\"", &s->login); | 750 "mail auth external: \"%V\"", &s->login); |
749 | 751 |
750 s->auth_method = NGX_MAIL_AUTH_EXTERNAL; | 752 s->auth_method = NGX_MAIL_AUTH_EXTERNAL; |
751 | 753 |