From 7520339cd1226cd3d4c0691df4b2291aa60b7118 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Wed, 14 Sep 2011 23:59:50 +0200 Subject: [PATCH] (smtpmail-send-command): Don't include AUTH passwords in the log buffer --- lisp/ChangeLog | 5 +++++ lisp/mail/smtpmail.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a8c50789a84..6804f4150af 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-09-14 Lars Magne Ingebrigtsen + + * mail/smtpmail.el (smtpmail-send-command): Don't include AUTH + passwords in the log buffer. + 2011-09-14 Stefan Monnier * textmodes/bibtex.el (bibtex-complete-string-cleanup) diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 544570a1bc3..42c43c0951c 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -891,8 +891,8 @@ The list is in preference order.") (defun smtpmail-send-command (process command) (goto-char (point-max)) - (if (= (aref command 0) ?P) - (insert "PASS \r\n") + (if (string-match "\\`AUTH [A-Z]+ " command) + (insert (match-string 0 command) "\r\n") (insert command "\r\n")) (setq smtpmail-read-point (point)) (process-send-string process command) -- 2.39.2