summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2017-10-03 09:54:51 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2017-10-03 09:54:51 +0300
commit48be9f7649b9107794e10d017e9a006eb84f2620 (patch)
treed179f026eb92e4647fae33d1cf9c947c4e8d882d /test
parent56ef361fe2a1a3b8d12f4cc2ef404c29b39b7c48 (diff)
downloadrspamd-48be9f7649b9107794e10d017e9a006eb84f2620.tar.gz
rspamd-48be9f7649b9107794e10d017e9a006eb84f2620.zip
[Test] Add test for next-to-last double bad extension
Diffstat (limited to 'test')
-rw-r--r--test/functional/cases/105_mimetypes.robot4
-rw-r--r--test/functional/messages/next2last-doublebad.eml9
2 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/cases/105_mimetypes.robot b/test/functional/cases/105_mimetypes.robot
index b47f64686..1756377d4 100644
--- a/test/functional/cases/105_mimetypes.robot
+++ b/test/functional/cases/105_mimetypes.robot
@@ -19,6 +19,10 @@ Zip Double Bad Extension
${result} = Scan Message With Rspamc ${TESTDIR}/messages/zip-doublebad.eml
Check Rspamc ${result} MIME_DOUBLE_BAD_EXTENSION \\(\\d+\\.\\d+\\)\\[\\.pdf\\.exe\\]\\n re=1
+Next-to-last Double Bad Extension
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/next2last-doublebad.eml
+ Check Rspamc ${result} MIME_DOUBLE_BAD_EXTENSION \\(\\d+\\.\\d+\\)\\[\\.scr\\.xz\\]\\n re=1
+
Rar4
${result} = Scan Message With Rspamc ${TESTDIR}/messages/rar4.eml
Check Rspamc ${result} MIME_BAD_EXTENSION \\(\\d+\\.\\d+\\)\\[exe\\]\\n re=1
diff --git a/test/functional/messages/next2last-doublebad.eml b/test/functional/messages/next2last-doublebad.eml
new file mode 100644
index 000000000..928117c27
--- /dev/null
+++ b/test/functional/messages/next2last-doublebad.eml
@@ -0,0 +1,9 @@
+Content-Type: multipart/mixed; boundary="--=_CDA2A73617693A02A72D9869"
+
+----=_CDA2A73617693A02A72D9869
+Content-Type: application/octet-stream; name="file.scr.xz"
+Content-Disposition: attachment; filename="file.scr.xz"
+Content-Transfer-Encoding: base64
+
+QlpoOTFBWSZTWeAw4GEAAADIAAAQQAAgACEAgrF3JFOFCQ4DDgYQ
+----=_CDA2A73617693A02A72D9869--