To complement bug-7241 tests.
--- /dev/null
+Ensure Lua transform that returns nil is treated as though no transformation took place and the buffer is unchanged.
--- /dev/null
+alert http any any -> any any (msg:"TEST"; http.uri; luaxform:transform.lua, bytes 0, offset 2;content:"exec_post.php"; sid:1; rev:1;)
--- /dev/null
+requires:
+ min-version: 8
+
+args:
+ - --set default-rule-path=${TEST_DIR}
+ - --set security.lua.allow-rules=true
+
+pcap: ../lua-transform-01/test.pcap
+
+checks:
+
+ - filter:
+ count: 1
+ match:
+ event_type: alert
+ alert.signature_id: 1
+ http.url: /exec_post.php
--- /dev/null
+function init (args)
+ local needs = {}
+ return needs
+end
+
+function transform(input_len, input, argc, args)
+ return nil
+end