"snoozing" with notmuch?
[notmuch-archives.git] / 84 / d3fe1ebecb1ec5ab1670b1c8cb5afddbbbbf4c
1 Return-Path: <aaronecay@gmail.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 6C4FC431FAF\r
6         for <notmuch@notmuchmail.org>; Thu, 19 Jan 2012 10:43:17 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id y-Md3tz8NJQ8 for <notmuch@notmuchmail.org>;\r
17         Thu, 19 Jan 2012 10:43:16 -0800 (PST)\r
18 Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com\r
19         [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id A07AE431FAE\r
22         for <notmuch@notmuchmail.org>; Thu, 19 Jan 2012 10:43:16 -0800 (PST)\r
23 Received: by qcpx40 with SMTP id x40so154166qcp.26\r
24         for <notmuch@notmuchmail.org>; Thu, 19 Jan 2012 10:43:16 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:subject:date:message-id:x-mailer:mime-version:content-type\r
27         :content-transfer-encoding;\r
28         bh=3PgMI83KguoV5yzly1gVPfqpp37bwHfEaidqI9QwmkU=;\r
29         b=IPBkSktLS1ogFxvC9gotQOEerWIwm2WqsLngHCiOmkNBhHj72qQ9KRhA+qiHoTApOE\r
30         f4/dtRCRayt+CTVxoXk7HQPg9RqR7guu4KO/hkWGovN5UZ/sMyX5hP+geVUrOBLGz7VN\r
31         mGRBz3tN1NaD1bdMT/jHRK99RPkq4Fx3QEKVQ=\r
32 Received: by 10.224.197.5 with SMTP id ei5mr16556315qab.73.1326998596033;\r
33         Thu, 19 Jan 2012 10:43:16 -0800 (PST)\r
34 Received: from wal016.wlan.sas.upenn.edu (wal016.wlan.sas.upenn.edu.\r
35         [128.91.71.145])\r
36         by mx.google.com with ESMTPS id dh10sm1294457qab.19.2012.01.19.10.43.14\r
37         (version=TLSv1/SSLv3 cipher=OTHER);\r
38         Thu, 19 Jan 2012 10:43:15 -0800 (PST)\r
39 From: Aaron Ecay <aaronecay@gmail.com>\r
40 To: notmuch@notmuchmail.org\r
41 Subject: [PATCH] emacs: Quote MML tags in replies\r
42 Date: Thu, 19 Jan 2012 13:43:09 -0500\r
43 Message-Id: <1326998589-37187-1-git-send-email-aaronecay@gmail.com>\r
44 X-Mailer: git-send-email 1.7.8.3\r
45 MIME-Version: 1.0\r
46 Content-Type: text/plain; charset=UTF-8\r
47 Content-Transfer-Encoding: 8bit\r
48 X-BeenThere: notmuch@notmuchmail.org\r
49 X-Mailman-Version: 2.1.13\r
50 Precedence: list\r
51 List-Id: "Use and development of the notmuch mail system."\r
52         <notmuch.notmuchmail.org>\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
56 List-Post: <mailto:notmuch@notmuchmail.org>\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
60 X-List-Received-Date: Thu, 19 Jan 2012 18:43:17 -0000\r
61 \r
62 Emacs message-mode uses certain text strings to indicate how to attach\r
63 files to outgoing mail.  If these are present in the text of an email,\r
64 and a user is tricked into replying to the message, the user’s files\r
65 could be exposed.\r
66 ---\r
67 \r
68 To demonstrate this, open a reply to this message then remove the\r
69 exclamation marks after the hash marks below.  Create a file in your\r
70 home directory called passwd.  Then press C-u M-x mml-preview.  A\r
71 (possibly base64-encoded) version of your ~/passwd file will replace\r
72 the following lines:\r
73 \r
74 <#!part type="application/octet-stream" filename="~/passwd"\r
75 disposition=attachment description=foo>\r
76 <#!/part>\r
77 \r
78 It works equally well (and more dangerously) with /etc/passwd, but I\r
79 didn't use that filename here to avoid the danger of someone\r
80 accidentally attaching their /etc/passwd to a reply in this thread!\r
81 \r
82  emacs/notmuch-mua.el |    3 ++-\r
83  1 files changed, 2 insertions(+), 1 deletions(-)\r
84 \r
85 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
86 index d8ab822..c25c6b9 100644\r
87 --- a/emacs/notmuch-mua.el\r
88 +++ b/emacs/notmuch-mua.el\r
89 @@ -115,7 +115,8 @@ list."\r
90      (push-mark))\r
91    (set-buffer-modified-p nil)\r
92  \r
93 -  (message-goto-body))\r
94 +  (message-goto-body)\r
95 +  (mml-quote-region (point) (mark)))\r
96  \r
97  (defun notmuch-mua-forward-message ()\r
98    (message-forward)\r
99 -- \r
100 1.7.8.3\r
101 \r