unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org
Subject: Re: [PATCH 2/2] emacs: mua: check for misplaced secure mml tags
Date: Sat, 08 Oct 2016 11:57:43 -0300	[thread overview]
Message-ID: <878ttyanx4.fsf@zancas.localnet> (raw)
In-Reply-To: <1475417131-24915-3-git-send-email-markwalters1009@gmail.com>

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

      reply	other threads:[~2016-10-08 14:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-02 14:05 [PATCH 0/2] Check for misplaced secure mml tags Mark Walters
2016-10-02 14:05 ` [PATCH 1/2] emacs: mua: extract a common message-send function Mark Walters
2016-10-02 14:05 ` [PATCH 2/2] emacs: mua: check for misplaced secure mml tags Mark Walters
2016-10-08 14:57   ` David Bremner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878ttyanx4.fsf@zancas.localnet \
    --to=david@tethera.net \
    --cc=markwalters1009@gmail.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).