File: match-getvar-transformation.lua

package info (click to toggle)
modsecurity 3.0.4-2
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 37,876 kB
  • sloc: cpp: 26,238; ansic: 15,058; sh: 5,346; python: 2,934; yacc: 2,872; makefile: 1,409; lex: 1,344; php: 42; perl: 36
file content (21 lines) | stat: -rw-r--r-- 409 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function main()
    ret = nil
    m.log(9, "Lets rock.");

    var = m.getvar("tx.test" , "lowercase");
    if var == nil then
        m.log(9, "Don't know what to say...");
        return ret;
    end

    if var == "FELIPE" then
        m.log(9, "Ops.");
    elseif var == "felipe" then
        m.log(9, "Just fine.");
        ret ="ok";
    else
        m.log(9, "Really?");
    end

    return "whee"
end