summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2017-12-08 10:25:49 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2017-12-08 10:25:49 +0300
commit4d9a038f4e3e2253a5e71749980ad12a29eb4cda (patch)
tree48f5064333fe20cf9c77c72b21d2f8ebc2cf2783 /test
parent09f3015da643b82e24b054f1704aa6783bfc79e8 (diff)
downloadrspamd-4d9a038f4e3e2253a5e71749980ad12a29eb4cda.tar.gz
rspamd-4d9a038f4e3e2253a5e71749980ad12a29eb4cda.zip
[Test] Add tests for MIME_DOUBLE_BAD_EXTENSION FPs
Diffstat (limited to 'test')
-rw-r--r--test/functional/cases/105_mimetypes.robot6
-rw-r--r--test/functional/messages/bad_ext.dotted_file_name.eml9
2 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/cases/105_mimetypes.robot b/test/functional/cases/105_mimetypes.robot
index 5e3860ef4..77afbadac 100644
--- a/test/functional/cases/105_mimetypes.robot
+++ b/test/functional/cases/105_mimetypes.robot
@@ -26,6 +26,12 @@ Next-to-last Double Bad Extension
Date is followed by Bad Extension
${result} = Scan Message With Rspamc ${TESTDIR}/messages/rar-date-bad-ext.eml
Check Rspamc ${result} MIME_BAD_EXTENSION \\(\\d+\\.\\d+\\)\\[scr\\]\\n re=1
+ Should Not Contain ${result.stdout} MIME_DOUBLE_BAD_EXTENSION
+
+Dotted file name is followed by Bad Extension
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/bad_ext.dotted_file_name.eml
+ Check Rspamc ${result} MIME_BAD_EXTENSION \\(\\d+\\.\\d+\\)\\[exe\\]\\n re=1
+ Should Not Contain ${result.stdout} MIME_DOUBLE_BAD_EXTENSION
Rar4
${result} = Scan Message With Rspamc ${TESTDIR}/messages/rar4.eml
diff --git a/test/functional/messages/bad_ext.dotted_file_name.eml b/test/functional/messages/bad_ext.dotted_file_name.eml
new file mode 100644
index 000000000..a12510635
--- /dev/null
+++ b/test/functional/messages/bad_ext.dotted_file_name.eml
@@ -0,0 +1,9 @@
+Content-Type: multipart/mixed; boundary="------------D6BBFC1853527FEEDD26DC71"
+
+--------------D6BBFC1853527FEEDD26DC71
+Content-Type: application/x-msdownload; name="bad_ext.dotted_file_name.exe"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename="bad_ext.dotted_file_name.exe"
+
+MAo=
+--------------D6BBFC1853527FEEDD26DC71--