mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Initial support for Lua script engine
This commit is contained in:
21
test/test-cases/data/match-getvars.lua
Normal file
21
test/test-cases/data/match-getvars.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
function dump(o)
|
||||
if type(o) == 'table' then
|
||||
local s = '{ '
|
||||
for k,v in pairs(o) do
|
||||
if type(k) ~= 'number' then k = '"'..k..'"' end
|
||||
s = s .. '['..k..'] = ' .. dump(v) .. ','
|
||||
end
|
||||
return s .. '} '
|
||||
else
|
||||
return tostring(o)
|
||||
end
|
||||
end
|
||||
|
||||
function main()
|
||||
ret = nil
|
||||
m.log(9, "Here I am");
|
||||
z = m.getvars("QUERY_STRING");
|
||||
m.log(9, "Z: " .. dump(z))
|
||||
|
||||
return ret
|
||||
end
|
Reference in New Issue
Block a user