diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-12-08 18:14:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-08 18:14:53 +0000 |
commit | a6c14bd4d0aa61f9f182087bb83d34dc0642d287 (patch) | |
tree | f5c12ef4b01caebea6bd96b8f6b1842ba3a14036 /test | |
parent | a3f235901143eb1e92294cf075349c411c6b0e86 (diff) | |
parent | 08461569b4ef12a5651ffb4ef7af064370e6758a (diff) | |
download | rspamd-a6c14bd4d0aa61f9f182087bb83d34dc0642d287.tar.gz rspamd-a6c14bd4d0aa61f9f182087bb83d34dc0642d287.zip |
Merge pull request #1950 from moisseev/mime_types
[Fix] mime_types: fix next-to-last extension length check
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/cases/105_mimetypes.robot | 6 | ||||
-rw-r--r-- | test/functional/messages/bad_ext.dotted_file_name.eml | 9 |
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-- |