# HG changeset patch # User Maxim Dounin # Date 1717426987 -10800 # Node ID f83cb031a4a4b43869f7a80c4265f580af3cf0d4 # Parent 32d4582c484d2b43e7b2a273daf60d3b0aaa6914 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. diff --git a/src/mail/ngx_mail_handler.c b/src/mail/ngx_mail_handler.c --- a/src/mail/ngx_mail_handler.c +++ b/src/mail/ngx_mail_handler.c @@ -744,6 +744,8 @@ ngx_mail_auth_external(ngx_mail_session_ s->login.len = external.len; s->login.data = external.data; + ngx_str_null(&s->passwd); + ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0, "mail auth external: \"%V\"", &s->login);