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

David Bremner david at tethera.net
Sat Oct 8 07:57:43 PDT 2016


Mark Walters <markwalters1009 at 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




More information about the notmuch mailing list