1+ [
2+ {
3+ "enabled" :1 ,
4+ "version_min" :300000 ,
5+ "title" :" Testing CtlRequestBodyProcessor=XML (1)" ,
6+ "expected" :{
7+ "debug_log" : " Registered XML namespace href \" http://schemas.xmlsoap.org/soap/envelope/\" prefix \" soap\" "
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+ "Cookie" : " PHPSESSID=rAAAAAAA2t5uvjq435r4q7ib3vtdjq120" ,
19+ "Content-Type" : " text/xml"
20+ },
21+ "uri" :" /?key=value&key=other_value" ,
22+ "method" :" POST" ,
23+ "body" : [
24+ " <?xml version=\" 1.0\" encoding=\" UTF-8\" ?>" ,
25+ " <bookstore>" ,
26+ " <book category=\" COOKING\" >" ,
27+ " <title lang=\" en\" >Everyday Italian</title>" ,
28+ " <author>Giada De Laurentiis</author>" ,
29+ " <year>2005</year>" ,
30+ " <price>30.00</price>" ,
31+ " </book>" ,
32+
33+ " <book category=\" CHILDREN\" >" ,
34+ " <title lang=\" en\" >Harry Potter</title>" ,
35+ " <author>J K. Rowling</author>" ,
36+ " <year>2005</year>" ,
37+ " <price>29.99</price>" ,
38+ " </book>" ,
39+
40+ " <book category=\" WEB\" >" ,
41+ " <title lang=\" en\" >XQuery Kick Start</title>" ,
42+ " <author>James McGovern</author>" ,
43+ " <author>Per Bothner</author>" ,
44+ " <author>Kurt Cagle</author>" ,
45+ " <author>James Linn</author>" ,
46+ " <author>Vaidyanathan Nagarajan</author>" ,
47+ " <year>2003</year>" ,
48+ " <price>49.99</price>" ,
49+ " </book>" ,
50+
51+ " <book category=\" WEB\" >" ,
52+ " <title lang=\" en\" >Learning XML</title>" ,
53+ " <author>Erik T. Ray</author>" ,
54+ " <year>2003</year>" ,
55+ " <price>39.95</price>" ,
56+ " </book>" ,
57+ " </bookstore>"
58+ ]
59+ },
60+ "server" :{
61+ "ip" :" 200.249.12.31" ,
62+ "port" :80
63+ },
64+ "rules" :[
65+ " SecRuleEngine On" ,
66+ " SecRequestBodyAccess On" ,
67+ " SecRule REQUEST_HEADERS:Content-Type \" ^text/xml$\" \" id:500005,phase:1,t:none,t:lowercase,nolog,pass,ctl:requestBodyProcessor=XML\" " ,
68+ " SecRule XML:/bookstore/book/price[text()] \" Fred\" \" phase:3,id:123,xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'\" "
69+ ]
70+ },
71+ {
72+ "enabled" :1 ,
73+ "version_min" :300000 ,
74+ "title" :" Testing CtlRequestBodyProcessor=XML (2)" ,
75+ "expected" :{
76+ "debug_log" : " XML: No XML document found, returning"
77+ },
78+ "client" :{
79+ "ip" :" 200.249.12.31" ,
80+ "port" :123
81+ },
82+ "request" :{
83+ "headers" :{
84+ "Host" :" localhost" ,
85+ "User-Agent" :" curl/7.38.0" ,
86+ "Accept" :" */*" ,
87+ "Cookie" : " PHPSESSID=rAAAAAAA2t5uvjq435r4q7ib3vtdjq120" ,
88+ "Content-Type" : " text/xml"
89+ },
90+ "uri" :" /?key=value&key=other_value" ,
91+ "method" :" POST" ,
92+ "body" : [
93+ " <?xml version=\" 1.0\" encoding=\" UTF-8\" ?>" ,
94+ " <bookstore>" ,
95+ " <book category=\" COOKING\" >" ,
96+ " <title lang=\" en\" >Everyday Italian</title>" ,
97+ " <author>Giada De Laurentiis</author>" ,
98+ " <year>2005</year>" ,
99+ " <price>30.00</price>" ,
100+ " </book>" ,
101+
102+ " <book category=\" CHILDREN\" >" ,
103+ " <title lang=\" en\" >Harry Potter</title>" ,
104+ " <author>J K. Rowling</author>" ,
105+ " <year>2005</year>" ,
106+ " <price>29.99</price>" ,
107+ " </book>" ,
108+
109+ " <book category=\" WEB\" >" ,
110+ " <title lang=\" en\" >XQuery Kick Start</title>" ,
111+ " <author>James McGovern</author>" ,
112+ " <author>Per Bothner</author>" ,
113+ " <author>Kurt Cagle</author>" ,
114+ " <author>James Linn</author>" ,
115+ " <author>Vaidyanathan Nagarajan</author>" ,
116+ " <year>2003</year>" ,
117+ " <price>49.99</price>" ,
118+ " </book>" ,
119+
120+ " <book category=\" WEB\" >" ,
121+ " <title lang=\" en\" >Learning XML</title>" ,
122+ " <author>Erik T. Ray</author>" ,
123+ " <year>2003</year>" ,
124+ " <price>39.95</price>" ,
125+ " </book>" ,
126+ " </bookstore>"
127+ ]
128+ },
129+ "server" :{
130+ "ip" :" 200.249.12.31" ,
131+ "port" :80
132+ },
133+ "rules" :[
134+ " SecRuleEngine On" ,
135+ " SecRequestBodyAccess On" ,
136+ " SecRule XML:/bookstore/book/price[text()] \" Fred\" \" phase:3,id:123,xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'\" "
137+ ]
138+ },
139+ {
140+ "enabled" :1 ,
141+ "version_min" :300000 ,
142+ "title" :" Testing CtlRequestBodyProcessor=XML (3)" ,
143+ "expected" :{
144+ "debug_log" : " XML: Failed parsing document."
145+ },
146+ "client" :{
147+ "ip" :" 200.249.12.31" ,
148+ "port" :123
149+ },
150+ "request" :{
151+ "headers" :{
152+ "Host" :" localhost" ,
153+ "User-Agent" :" curl/7.38.0" ,
154+ "Accept" :" */*" ,
155+ "Cookie" : " PHPSESSID=rAAAAAAA2t5uvjq435r4q7ib3vtdjq120" ,
156+ "Content-Type" : " text/xml"
157+ },
158+ "uri" :" /?key=value&key=other_value" ,
159+ "method" :" POST" ,
160+ "body" : [
161+ " not a xml"
162+ ]
163+ },
164+ "server" :{
165+ "ip" :" 200.249.12.31" ,
166+ "port" :80
167+ },
168+ "rules" :[
169+ " SecRuleEngine On" ,
170+ " SecRequestBodyAccess On" ,
171+ " SecRule REQUEST_HEADERS:Content-Type \" ^text/xml$\" \" id:500005,phase:1,t:none,t:lowercase,nolog,pass,ctl:requestBodyProcessor=XML\" " ,
172+ " SecRule XML:/bookstore/book/price[text()] \" Fred\" \" phase:3,id:123,xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'\" "
173+ ]
174+ }
175+ ]
0 commit comments