Re: [PATCH 2/2] emacs: mua: check for misplaced secure mml tags

Subject: Re: [PATCH 2/2] emacs: mua: check for misplaced secure mml tags

Date: Sat, 08 Oct 2016 11:57:43 -0300

To: Mark Walters, notmuch@notmuchmail.org

Cc:

From: David Bremner


Mark Walters <markwalters1009@gmail.com> writes:

> +  (save-excursion
> +    (let ((body-start (progn (message-goto-body) (point))))
> +      (goto-char (point-max))
> +      ;; We are always fine if there is no secure tag.
> +      (when (search-backward "<#secure" nil 't)
> +	;; There is a secure tag, so it must be at the start of the
> +	;; body, with no secure tag earlier (i.e., in the headers) and
> +	;; it must be followed by a newline.
> +	(unless (and (= (point) body-start)
> +		     (not (search-backward "<#secure" nil 't))
> +		     (looking-at "<#secure[^\n>]*>\n"))

I believe the tag is actually "#secure" not "#!secure"

> +	  (not (yes-or-no-p "\
> +There is a <#secure> tag not at the start of the body. It is
> +likely that the message will be sent unsigned and unencrypted.
> +Really send? ")))))))
> +

This is message is a bit misleading if tag is at the begining of the
body but is not followed by a newline

d



Thread: