1
+ [
2
+ {
3
+ "enabled" :1 ,
4
+ "version_min" :300000 ,
5
+ "title" :" Testing USERID variable (1/2)" ,
6
+ "expected" :{
7
+ "debug_log" : " Target value: \" zimmerle2\" "
8
+ },
9
+ "client" :{
10
+ "ip" :" 200.249.12.31" ,
11
+ "port" :123
12
+ },
13
+ "request" :{
14
+ "headers" :{
15
+ "Host" :" localhost" ,
16
+ "User-Agent" :" curl/7.38.0" ,
17
+ "Accept" :" */*" ,
18
+ "User-Agent" :" My sweet little browser" ,
19
+ "Cookie" : " USER=zimmerle"
20
+ },
21
+ "uri" :" /?key=value&key=other_value" ,
22
+ "method" :" GET"
23
+ },
24
+ "server" :{
25
+ "ip" :" 200.249.12.31" ,
26
+ "port" :80
27
+ },
28
+ "rules" :[
29
+ " SecRuleEngine On" ,
30
+ " SecDebugLog \/ tmp\/ modsec_debug.log" ,
31
+ " SecRule REQUEST_HEADERS:User-Agent \" ^(.*)$\" \" id:'900018',phase:1,t:none,t:sha1,t:hexEncode,setuid:%{REQUEST_COOKIES:USER}%,nolog,pass\" " ,
32
+ " SecRule REQUEST_HEADERS:User-Agent \" ^(.*)$\" \" id:'900068',phase:1,t:none,t:sha1,t:hexEncode,setuid:%{REQUEST_COOKIES:USER}2,nolog,pass\" " ,
33
+ " SecRule USERID \" .*\" \" id:1239,phase:1,log,pass\" "
34
+ ]
35
+ },
36
+ {
37
+ "enabled" :1 ,
38
+ "version_min" :300000 ,
39
+ "title" :" Testing USERID variable (2/2)" ,
40
+ "expected" :{
41
+ "debug_log" : " Target value: \" whee\" "
42
+ },
43
+ "client" :{
44
+ "ip" :" 200.249.12.31" ,
45
+ "port" :123
46
+ },
47
+ "request" :{
48
+ "headers" :{
49
+ "Host" :" localhost" ,
50
+ "User-Agent" :" curl/7.38.0" ,
51
+ "Accept" :" */*" ,
52
+ "User-Agent" :" My sweet little browser" ,
53
+ "Cookie" : " USER=whee"
54
+ },
55
+ "uri" :" /?key=value&key=other_value" ,
56
+ "method" :" GET"
57
+ },
58
+ "server" :{
59
+ "ip" :" 200.249.12.31" ,
60
+ "port" :80
61
+ },
62
+ "rules" :[
63
+ " SecRuleEngine On" ,
64
+ " SecDebugLog \/ tmp\/ modsec_debug.log" ,
65
+ " SecRule REQUEST_HEADERS:User-Agent \" ^(.*)$\" \" id:'900018',phase:1,t:none,t:sha1,t:hexEncode,setuid:%{REQUEST_COOKIES:USER}%,nolog,pass\" " ,
66
+ " SecRule USERID \" .*\" \" id:1239,phase:1,log,pass\" "
67
+ ]
68
+ }
69
+ ]
0 commit comments