Skip to content

Commit 2cb0726

Browse files
authored
fix: FP when searching for plugins (#48)
* Update wordpress-rule-exclusions-before.conf * Create 9507972.yaml
1 parent 78c21af commit 2cb0726

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

Diff for: plugins/wordpress-rule-exclusions-before.conf

+16
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,22 @@ SecRule REQUEST_FILENAME "@rx /wp-admin/(?:plugins|plugin-install)\.php$" \
10451045
ctl:ruleRemoveTargetById=953100;RESPONSE_BODY,\
10461046
ctl:ruleRemoveTargetById=953101;RESPONSE_BODY"
10471047

1048+
# Search for plugins
1049+
SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \
1050+
"id:9507972,\
1051+
phase:2,\
1052+
pass,\
1053+
t:none,\
1054+
nolog,\
1055+
ver:'wordpress-rule-exclusions-plugin/1.0.1',\
1056+
chain"
1057+
SecRule ARGS:action "@streq search-install-plugins" \
1058+
"t:none,\
1059+
chain"
1060+
SecRule &ARGS:action "@eq 1" \
1061+
"t:none,\
1062+
ctl:ruleRemoveTargetById=942360;ARGS:s"
1063+
10481064
SecMarker "END-WORDPRESS-ADMIN"
10491065

10501066

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
meta:
3+
author: "azurit"
4+
description: "Wordpress Rule Exclusions Plugin"
5+
enabled: true
6+
name: 9507972.yaml
7+
tests:
8+
- test_title: 9507972-1
9+
desc:
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+
port: 80
19+
method: POST
20+
version: "HTTP/1.1"
21+
uri: /post/wp-admin/admin-ajax.php
22+
data: action=search-install-plugins&s=%20Insert%20Headers%20and%20Footers
23+
output:
24+
no_log_contains: id "942360"

0 commit comments

Comments
 (0)