mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
emacs: quote MML tags in replies
Emacs message-mode uses certain text strings to indicate how to attach files to outgoing mail. If these are present in the text of an email, and a user is tricked into replying to the message, the user’s files could be exposed. Edited-by: Pieter Praet <pieter@praet.org>: Rebased to release branch.
This commit is contained in:
parent
3f2050ac22
commit
ae438ccd8c
3 changed files with 17 additions and 2 deletions
11
NEWS
11
NEWS
|
@ -11,6 +11,17 @@ Fix error handling in python bindings.
|
||||||
exceptions to indicate the error condition. Any subsequent calls
|
exceptions to indicate the error condition. Any subsequent calls
|
||||||
into libnotmuch caused segmentation faults.
|
into libnotmuch caused segmentation faults.
|
||||||
|
|
||||||
|
Quote MML tags in replies
|
||||||
|
|
||||||
|
MML tags are text codes that Emacs uses to indicate attachments
|
||||||
|
(among other things) in messages being composed. The Emacs
|
||||||
|
interface did not quote MML tags in the quoted text of a reply.
|
||||||
|
User could be tricked into replying to a maliciously formatted
|
||||||
|
message and not editing out the MML tags from the quoted text. This
|
||||||
|
could lead to files from the user's machine being attached to the
|
||||||
|
outgoing message. The Emacs interface now quotes these tags in
|
||||||
|
reply text, so that they do not effect outgoing messages.
|
||||||
|
|
||||||
|
|
||||||
Notmuch 0.11 (2012-01-13)
|
Notmuch 0.11 (2012-01-13)
|
||||||
=========================
|
=========================
|
||||||
|
|
|
@ -111,7 +111,12 @@ list."
|
||||||
(insert body))
|
(insert body))
|
||||||
(set-buffer-modified-p nil)
|
(set-buffer-modified-p nil)
|
||||||
|
|
||||||
(message-goto-body))
|
(message-goto-body)
|
||||||
|
;; Original message may contain (malicious) MML tags. We must
|
||||||
|
;; properly quote them in the reply. Note that using `point-max'
|
||||||
|
;; instead of `mark' here is wrong. The buffer may include user's
|
||||||
|
;; signature which should not be MML-quoted.
|
||||||
|
(mml-quote-region (point) (point-max)))
|
||||||
|
|
||||||
(defun notmuch-mua-forward-message ()
|
(defun notmuch-mua-forward-message ()
|
||||||
(message-forward)
|
(message-forward)
|
||||||
|
|
|
@ -274,7 +274,6 @@ EOF
|
||||||
test_expect_equal_file OUTPUT EXPECTED
|
test_expect_equal_file OUTPUT EXPECTED
|
||||||
|
|
||||||
test_begin_subtest "Quote MML tags in reply"
|
test_begin_subtest "Quote MML tags in reply"
|
||||||
test_subtest_known_broken
|
|
||||||
message_id='test-emacs-mml-quoting@message.id'
|
message_id='test-emacs-mml-quoting@message.id'
|
||||||
add_message [id]="$message_id" \
|
add_message [id]="$message_id" \
|
||||||
"[subject]='$test_subtest_name'" \
|
"[subject]='$test_subtest_name'" \
|
||||||
|
|
Loading…
Reference in a new issue