aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2017-12-05 21:17:58 -0400
committerDavid Bremner <david@tethera.net>2017-12-08 20:36:20 -0400
commit151b2c37472ddca1a974044c77108c784a6bc79a (patch)
tree79fadb5a593e9a59141b5f41b2a7b97f5cb577a9 /test
parentf55e9a3bdaadb6d7db7321d0aee5de642743651d (diff)
test/emacs: add exploit mitigation test
This test will pass if either the notmuch show mitigation code is working correctly, or upstream emacs mime handling code has it's own fix for https://bugs.gnu.org/28350.
Diffstat (limited to 'test')
-rwxr-xr-xtest/T450-emacs-show.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/T450-emacs-show.sh b/test/T450-emacs-show.sh
index db48c7d5..6a458565 100755
--- a/test/T450-emacs-show.sh
+++ b/test/T450-emacs-show.sh
@@ -198,5 +198,14 @@ This is an error
stdout:
This is output"
+test_begin_subtest "text/enriched exploit mitigation"
+add_message '[content-type]="text/enriched"
+ [body]="
+<x-display><param>(when (progn (read-only-mode -1) (insert ?p ?0 ?w ?n ?e ?d)) nil)</param>test</x-display>
+"'
+test_emacs '(notmuch-show "id:'$gen_msg_id'")
+ (test-visible-output "OUTPUT.raw")'
+output=$(head -1 OUTPUT.raw|cut -f1-4 -d' ')
+test_expect_equal "$output" "Notmuch Test Suite <test_suite@notmuchmail.org>"
test_done