summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMikhail Galanin <mgalanin@mimecast.com>2018-07-27 16:57:32 +0100
committerMikhail Galanin <mgalanin@mimecast.com>2018-07-27 16:57:32 +0100
commit6a1a93fffccd1344c87b33d7baacf9d25b5ba97b (patch)
treec85b02f48d78c03390eef08d352a9d400674be8d /test
parentdb3d0cb4b994558f63a28011a13a9e08d5f6d1d8 (diff)
downloadrspamd-6a1a93fffccd1344c87b33d7baacf9d25b5ba97b.tar.gz
rspamd-6a1a93fffccd1344c87b33d7baacf9d25b5ba97b.zip
[Fix] Detect empty text part as text, not HTML
Issue: #2367
Diffstat (limited to 'test')
-rw-r--r--test/functional/cases/105_mimetypes.robot4
-rw-r--r--test/functional/messages/empty-plain-text.eml14
2 files changed, 18 insertions, 0 deletions
diff --git a/test/functional/cases/105_mimetypes.robot b/test/functional/cases/105_mimetypes.robot
index 895255194..3c1a03930 100644
--- a/test/functional/cases/105_mimetypes.robot
+++ b/test/functional/cases/105_mimetypes.robot
@@ -45,6 +45,10 @@ Multipart Archive Extension
${result} = Scan Message With Rspamc ${TESTDIR}/messages/f.zip.001.eml
Should Not Contain ${result.stdout} MIME_ARCHIVE_IN_ARCHIVE
+Empty text part should not be treat as html
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/empty-plain-text.eml
+ Should Not Contain ${result.stdout} FORGED_OUTLOOK_HTML
+
*** Keywords ***
MIMETypes Setup
${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/mime_types.conf
diff --git a/test/functional/messages/empty-plain-text.eml b/test/functional/messages/empty-plain-text.eml
new file mode 100644
index 000000000..2c4fa3e90
--- /dev/null
+++ b/test/functional/messages/empty-plain-text.eml
@@ -0,0 +1,14 @@
+Return-Path: test@test.com
+From: TEST <test@test.com>
+MIME-Version: 1.0
+X-Priority: 1 (Highest)
+X-MSMail-Priority: High
+X-Mailer: Microsoft Outlook 16.0
+Importance: High
+Date: Mon, 23 Jul 2018 16:24:13 +0200
+Message-ID: <d9946a191e0c97733a86424c48e65eca@test.com>
+Subject: Test Subject
+To: Me <me@me.me>
+Content-Type: text/plain; charset="UTF-8"
+
+