# HG changeset patch # User Richard M. Stallman # Date 872964213 0 # Node ID 3be882bc0211cc4009965ea4e25090498fcbb692 # Parent c6343f7a9c6cf9850a144aeca180af3318ab8bc4 (mail-send): Complain about invalid header line. diff -r c6343f7a9c6c -r 3be882bc0211 lisp/mail/sendmail.el --- 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)