diff 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
line wrap: on
line diff
--- 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);