Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: FP while uploading an image #14

Merged
merged 3 commits into from
Dec 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions plugins/wordpress-rule-exclusions-before.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ------------------------------------------------------------------------
# OWASP ModSecurity Core Rule Set Plugin
# Copyright (c) 2021-2022 Core Rule Set project. All rights reserved.
# Copyright (c) 2021-2023 Core Rule Set project. All rights reserved.
#
# The OWASP ModSecurity Core Rule Set plugins are distributed under
# Apache Software License (ASL) version 2
Expand All @@ -11,7 +11,7 @@
# Plugin name: wordpress-rule-exclusions
# Plugin description:
# Rule ID block base: 9,507,000 - 9,507,999
# Plugin version: 1.0.0
# Plugin version: 1.0.1

# Documentation can be found here:
# https://github.com/coreruleset/wordpress-rule-exclusions-plugin
Expand Down Expand Up @@ -714,6 +714,24 @@ SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \
"t:none,\
ctl:ruleRemoveTargetByTag=attack-xss;ARGS:description"

# Upload media
SecRule REQUEST_FILENAME "@endsWith /wp-admin/async-upload.php" \
"id:9507790,\
phase:2,\
pass,\
t:none,\
nolog,\
ver:'wordpress-rule-exclusions-plugin/1.0.1',\
chain"
SecRule ARGS:action "@streq upload-attachment" \
"t:none,\
chain"
SecRule &ARGS:action "@eq 1" \
"t:none,\
ctl:ruleRemoveTargetById=920120;FILES:async-upload,\
ctl:ruleRemoveTargetById=933210;ARGS:name,\
ctl:ruleRemoveTargetById=942100;ARGS:name"


#
# [ Options and Settings ]
Expand Down