Skip to content

Commit e17482c

Browse files
authored
Merge branch 'coreruleset:master' into fix-tags
2 parents cfb12aa + 01808dd commit e17482c

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed

plugins/wordpress-rule-exclusions-before.conf

+27
Original file line numberDiff line numberDiff line change
@@ -1126,4 +1126,31 @@ SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \
11261126
"t:none,\
11271127
ctl:ruleRemoveTargetById=942360;ARGS:s"
11281128

1129+
# Uploading plugins as a zip file
1130+
SecRule REQUEST_FILENAME "@endsWith /wp-admin/update.php" \
1131+
"id:9507973,\
1132+
phase:2,\
1133+
pass,\
1134+
t:none,\
1135+
nolog,\
1136+
ver:'wordpress-rule-exclusions-plugin/1.0.1',\
1137+
chain"
1138+
SecRule ARGS:action "@streq upload-plugin" \
1139+
"t:none,\
1140+
chain"
1141+
SecRule FILES:pluginzip "@endsWith .zip" \
1142+
"t:none,\
1143+
ctl:ruleRemoveTargetById=944110;REQUEST_BODY,\
1144+
ctl:ruleRemoveTargetById=944250;REQUEST_BODY"
1145+
1146+
# Installing a plugin via zip file upload
1147+
SecRule REQUEST_FILENAME "@endsWith /wp-admin/update.php" \
1148+
"id:9507974,\
1149+
phase:1,\
1150+
pass,\
1151+
t:none,\
1152+
nolog,\
1153+
ver:'wordpress-rule-exclusions-plugin/1.0.1',\
1154+
ctl:ruleRemoveTargetById=932236;ARGS:install-plugin-submit"
1155+
11291156
SecMarker "END-WORDPRESS-ADMIN"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
meta:
3+
author: "Esad Cetiner"
4+
description: "Wordpress Rule Exclusions Plugin"
5+
enabled: true
6+
name: 9507974.yaml
7+
tests:
8+
- test_title: 9507974-1
9+
desc: Installing a plugin via zip file upload
10+
stages:
11+
- stage:
12+
input:
13+
dest_addr: 127.0.0.1
14+
headers:
15+
Host: localhost
16+
User-Agent: "OWASP CRS test agent"
17+
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
18+
Content-Type: "multipart/form-data; boundary=----WebKitFormBoundarylBwlewqbn4fBRA7B"
19+
port: 80
20+
method: POST
21+
version: "HTTP/1.1"
22+
uri: /post/wp-admin/update.php?action=upload-plugin
23+
data: |
24+
------WebKitFormBoundarylBwlewqbn4fBRA7B
25+
Content-Disposition: form-data; name="_wpnonce"
26+
27+
7347be877b
28+
------WebKitFormBoundarylBwlewqbn4fBRA7B
29+
Content-Disposition: form-data; name="_wp_http_referer"
30+
31+
/wp-admin/plugin-install.php
32+
------WebKitFormBoundarylBwlewqbn4fBRA7B
33+
Content-Disposition: form-data; name="pluginzip"; filename="akismet.5.3.3.zip"
34+
Content-Type: application/x-zip-compressed
35+
<Plugin data goes here>
36+
37+
------WebKitFormBoundarylBwlewqbn4fBRA7B
38+
Content-Disposition: form-data; name="install-plugin-submit"
39+
40+
Install Now
41+
------WebKitFormBoundarylBwlewqbn4fBRA7B--
42+
output:
43+
no_log_contains: id "932236"

0 commit comments

Comments
 (0)