]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
websocket: add test with decompression
authorPhilippe Antoine <pantoine@oisf.net>
Sat, 29 Mar 2025 21:07:59 +0000 (22:07 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 18 Apr 2025 10:52:19 +0000 (12:52 +0200)
Ticket: 7285

tests/websocket-compressed/README.md [new file with mode: 0644]
tests/websocket-compressed/example_websocket.pcap [new file with mode: 0644]
tests/websocket-compressed/test.rules [new file with mode: 0644]
tests/websocket-compressed/test.yaml [new file with mode: 0644]

diff --git a/tests/websocket-compressed/README.md b/tests/websocket-compressed/README.md
new file mode 100644 (file)
index 0000000..77983d4
--- /dev/null
@@ -0,0 +1,11 @@
+# Test Description
+
+Test websocket decompression
+
+## Related issue
+
+https://redmine.openinfosecfoundation.org/issues/7285
+
+## PCAP
+
+Supplied at https://redmine.openinfosecfoundation.org/issues/7285
diff --git a/tests/websocket-compressed/example_websocket.pcap b/tests/websocket-compressed/example_websocket.pcap
new file mode 100644 (file)
index 0000000..e17749b
Binary files /dev/null and b/tests/websocket-compressed/example_websocket.pcap differ
diff --git a/tests/websocket-compressed/test.rules b/tests/websocket-compressed/test.rules
new file mode 100644 (file)
index 0000000..a238735
--- /dev/null
@@ -0,0 +1 @@
+alert websocket any any -> any any (msg:"There is no text opcode in this packet"; websocket.payload; content: "TOGGLE=5659131662f54334"; sid:1;)
diff --git a/tests/websocket-compressed/test.yaml b/tests/websocket-compressed/test.yaml
new file mode 100644 (file)
index 0000000..62ada0e
--- /dev/null
@@ -0,0 +1,12 @@
+requires:
+  min-version: 8
+
+args:
+- -k none --set stream.inline=true
+
+checks:
+- filter:
+    count: 1
+    match:
+      event_type: alert
+      alert.signature_id: 1