]> source.dussan.org Git - rspamd.git/commitdiff
[Test] Bad Boundary
authorkorgoth1 <vladislav.stakhov@gmail.com>
Fri, 27 Sep 2019 19:01:22 +0000 (22:01 +0300)
committerkorgoth1 <vladislav.stakhov@gmail.com>
Fri, 27 Sep 2019 19:01:22 +0000 (22:01 +0300)
test/functional/cases/280_rules.robot
test/functional/messages/badboundary.eml [new file with mode: 0644]

index d66ecf5d47644edadd5b4c85d6fb3707a5f89c11..882fc7275bb4095aca28cda0f5c6d63fc361d88e 100644 (file)
@@ -12,6 +12,7 @@ ${MESSAGE1}      ${TESTDIR}/messages/fws_fn.eml
 ${MESSAGE2}      ${TESTDIR}/messages/fws_fp.eml
 ${MESSAGE3}      ${TESTDIR}/messages/fws_tp.eml
 ${MESSAGE4}      ${TESTDIR}/messages/broken_richtext.eml
+${MESSAGE5}      ${TESTDIR}/messages/badboundary.eml
 ${URL_TLD}       ${TESTDIR}/../lua/unit/test_tld.dat
 ${RSPAMD_SCOPE}  Test
 
@@ -40,6 +41,10 @@ Dynamic Config
   Check Rspamc  ${result}  SA_BODY_WORD (10
   Check Rspamc  ${result}  \/ 20
 
+Broken boundary
+  ${result} =  Scan Message With Rspamc  ${MESSAGE4}
+  Check Rspamc  ${result}  BROKEN_CONTENT_TYPE
+
 *** Keywords ***
 Rules Setup
   ${PLUGIN_CONFIG} =  Get File  ${TESTDIR}/configs/regexp.conf
diff --git a/test/functional/messages/badboundary.eml b/test/functional/messages/badboundary.eml
new file mode 100644 (file)
index 0000000..a298ee9
--- /dev/null
@@ -0,0 +1,17 @@
+Content-Type: multipart/mixed; boundary="===============3209040583106423479=="\r
+MIME-Version: 1.0\r
+From: test@example.org\r
+To: test@example.org\r
+Date: Thu, 26 Sep 2019 15:52:32 -0000\r
+Subject: Test message\r
+Message-ID: <156951315267.43830.14912869070271436609@example.org>\r
+\r
+--===============3209040583106423479==\r
+Content-Type: image/gif\r
+MIME-Version: 1.0\r
+Content-Transfer-Encoding: base64\r
+Content-Disposition: attachment; filename="Transparent.gif"\r
+\r
+R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\r
+\r
+--===============3209040583106423479==
\ No newline at end of file