Skip to content

Commit 78c21af

Browse files
authored
fix: false positive related to navigation menu update (#47)
* Update wordpress-rule-exclusions-before.conf * Update wordpress-rule-exclusions-before.conf * Update wordpress-rule-exclusions-before.conf
1 parent 544494e commit 78c21af

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \
131131
#
132132

133133
# Gutenberg
134-
SecRule REQUEST_FILENAME "@rx /wp-json/wp/v[0-9]+/(?:posts|pages|templates)" \
134+
SecRule REQUEST_FILENAME "@rx /wp-json/wp/v[0-9]+/(?:posts|pages|templates|navigation)" \
135135
"id:9507140,\
136136
phase:1,\
137137
pass,\
@@ -231,17 +231,17 @@ SecRule REQUEST_FILENAME "@endsWith /index.php" \
231231

232232
# Cannot update page|post in WordPress due to `x-http-method-override` header.
233233
# This rule is a copy of rule 900250 and must be synchronised with that rule.
234-
SecRule REQUEST_FILENAME "@rx /wp-json/wp/v[0-9]+/(?:posts|pages|users|templates)" \
234+
SecRule REQUEST_FILENAME "@rx /wp-json/wp/v[0-9]+/(?:posts|pages|users|templates|navigation)" \
235235
"id:9507146,\
236236
phase:1,\
237237
pass,\
238238
t:none,\
239239
nolog,\
240240
ver:'wordpress-rule-exclusions-plugin/1.0.1',\
241241
chain"
242-
SecRule REQUEST_METHOD "@streq POST" \
242+
SecRule &REQUEST_HEADERS:x-http-method-override "!@eq 0" \
243243
"t:none,\
244-
setvar:'tx.restricted_headers_basic=/content-encoding/ /proxy/ /lock-token/ /content-range/ /if/ /x-http-method/ /x-method-override/'"
244+
ctl:ruleRemoveById=920450"
245245

246246
# Loading tags/catagories for pages/posts
247247
# Obtaining metadata for pages/posts

0 commit comments

Comments
 (0)