Skip to content

Commit

Permalink
chore: apply code review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
theseion committed Oct 16, 2023
1 parent f742aac commit 32df7ce
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions plugins/wordpress-rule-exclusions-before.conf
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,23 @@ SecRule REQUEST_FILENAME "@endsWith /index.php" \

# Gutenberg full site editor (v6.3.1+).
# Requests can contain CSS data, which are detected by libinjection.
SecRule ARGS_GET "@rx /wp/v[0-9]/global-styles/" \
# Uses an additional chain rule to prevent evasion by supplying another
# argument with the same name.
SecRule REQUEST_FILENAME "@endsWith /index.php" \
"id:9507145,\
phase:1,\
phase:2,\
pass,\
t:none,\
nolog,\
ctl:ruleRemoveTargetById=942100;ARGS,\
ver:'wordpress-rule-exclusions-plugin/1.0.0'"
ver:'wordpress-rule-exclusions-plugin/1.0.1',\
chain"
SecRule &ARGS:rest_route "@eq 1" \
"t:none,\
nolog,\
chain"
SecRule ARGS:rest_route "@rx ^/wp/v[0-9]+/global-styles/[0-9]+$" \
"t:none,\
ctl:ruleRemoveTargetById=942100;ARGS"

#
# [ Live preview ]
Expand Down

0 comments on commit 32df7ce

Please sign in to comment.