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:
20
test/test-cases/data/match-getvar-transformation.lua
Normal file
20
test/test-cases/data/match-getvar-transformation.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
function main()
|
||||
ret = nil
|
||||
|
||||
var = m.getvar("tx.test");
|
||||
if var == nil then
|
||||
m.log(9, "Don't know what to say...");
|
||||
return ret
|
||||
end
|
||||
|
||||
if var == "FELIPE"
|
||||
m.log(9, "Ops.");
|
||||
elseif var == "felipe"
|
||||
m.log(9, "Just fine.");
|
||||
ret ="ok";
|
||||
else
|
||||
m.log(9, "Really?");
|
||||
end
|
||||
|
||||
return ret
|
||||
end
|
Reference in New Issue
Block a user