Mercurial > emacs
changeset 19628:3be882bc0211
(mail-send): Complain about invalid header line.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 30 Aug 1997 18:03:33 +0000 |
parents | c6343f7a9c6c |
children | 70c989c729f1 |
files | lisp/mail/sendmail.el |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mail/sendmail.el Sat Aug 30 17:51:22 1997 +0000 +++ b/lisp/mail/sendmail.el Sat Aug 30 18:03:33 1997 +0000 @@ -575,6 +575,13 @@ (or (y-or-n-p "Message contains non-ASCII characters; send anyway? ") (error "Aborted")) (error "Message contains non-ASCII characters")))) + ;; Complain about any invalid line. + (goto-char (point-min)) + (while (not (looking-at (regexp-quote mail-header-separator))) + (unless (looking-at "[ \t]\\|.*:\\|$") + (push-mark opoint) + (error "Invalid header line (maybe a continuation line lacks initial whitespace)")) + (forward-line 1)) (goto-char opoint) (run-hooks 'mail-send-hook) (message "Sending...") @@ -633,10 +640,11 @@ (if mail-aliases (expand-mail-aliases (point-min) delimline)) (goto-char (point-min)) - ;; ignore any blank lines in the header + ;; Ignore any blank lines in the header (while (and (re-search-forward "\n\n\n*" delimline t) (< (point) delimline)) (replace-match "\n")) + (goto-char (point-min)) (let ((case-fold-search t)) (goto-char (point-min)) (while (re-search-forward "^Resent-\\(to\\|cc\\|bcc\\):" delimline t)