]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
smtp: adds test with To field having quotes, commas... 1882/head
authorPhilippe Antoine <pantoine@oisf.net>
Thu, 30 May 2024 09:28:58 +0000 (11:28 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 4 Jun 2024 04:28:28 +0000 (06:28 +0200)
Ticket: 3487

tests/smtp-to-comma/10.7.29.101_49898-178.63.41.150_25.pcap [new file with mode: 0644]
tests/smtp-to-comma/README.md [new file with mode: 0644]
tests/smtp-to-comma/test.yaml [new file with mode: 0644]

diff --git a/tests/smtp-to-comma/10.7.29.101_49898-178.63.41.150_25.pcap b/tests/smtp-to-comma/10.7.29.101_49898-178.63.41.150_25.pcap
new file mode 100644 (file)
index 0000000..726b18f
Binary files /dev/null and b/tests/smtp-to-comma/10.7.29.101_49898-178.63.41.150_25.pcap differ
diff --git a/tests/smtp-to-comma/README.md b/tests/smtp-to-comma/README.md
new file mode 100644 (file)
index 0000000..9aa6380
--- /dev/null
@@ -0,0 +1,11 @@
+# Test Description
+
+Test that we log SMTP `To` field right if there are quotes and commas, and spaces
+
+## PCAP
+
+smtp-data-rejected/10.7.29.101_49898-178.63.41.150_25.pcap modified by hand
+
+## Related issues
+
+https://redmine.openinfosecfoundation.org/issues/3487
diff --git a/tests/smtp-to-comma/test.yaml b/tests/smtp-to-comma/test.yaml
new file mode 100644 (file)
index 0000000..0071818
--- /dev/null
@@ -0,0 +1,15 @@
+requires:
+  min-version: 8
+
+# disables checksum verification
+args:
+  - -k none
+
+checks:
+  - filter:
+      count: 1
+      match:
+        event_type: smtp
+        email.cc[0]: "\"jam,abrakadabra.ch\" <mirjam@abrakadabra.ch>"
+        # do not log empty fields
+        not-has-key: email.to