Skip to content

Commit

Permalink
Use new mechanism to disable plugin
Browse files Browse the repository at this point in the history
Updated readme
  • Loading branch information
theseion committed Apr 20, 2022
1 parent a95c084 commit ad2658e
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
- [Walter Hop](https://github.com/lifeforms)
- [Jozef Sudolský](https://github.com/azurit)
- [Felipe Zipitría](https://github.com/fzipi)
- [Max Leske](https://github.com/theseion)
4 changes: 4 additions & 0 deletions plugins/phpmyadmin-rule-exclusions-before.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
# Documentation can be found here:
# https://github.com/coreruleset/phpmyadmin-rule-exclusions-plugin

# Generic rule to disable plugin
SecRule TX:phpmyadmin-rule-exclusions-plugin_enabled "@eq 0" "id:9513099,phase:1,pass,nolog,ctl:ruleRemoveById=9513100-9513999"


# Editing / copying a row - loading row data
SecRule REQUEST_FILENAME "@endsWith /tbl_change.php" \
"id:9513100,\
Expand Down
43 changes: 43 additions & 0 deletions plugins/phpmyadmin-rule-exclusions-config.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# ------------------------------------------------------------------------
# OWASP ModSecurity Core Rule Set Plugin
# Copyright (c) 2021-2022 Core Rule Set project. All rights reserved.
#
# The OWASP ModSecurity Core Rule Set plugins are distributed under
# Apache Software License (ASL) version 2
# Please see the enclosed LICENSE file for full details.
# ------------------------------------------------------------------------

# OWASP CRS Plugin
# Plugin name: phpmyadmin-rule-exclusions
# Plugin description:
# Rule ID block base: 9,513,000 - 9,513,999
# Plugin version: 1.0.0

# Documentation can be found here:
# https://github.com/coreruleset/phpmyadmin-rule-exclusions-plugin

# Generic rule to disable the plugin
#
# Plugins are enabled by default.
#
# They become active by placing them in the plugin folder. It is possible to
# control plugin activation via setting a variable. This can be done in the
# plugin config file here.
#
# The predefined variable name is meant to be "<plugin name>-plugin_enabled".
# For the phpmyadmin-rule-exclusions-plugin, this means it can be disabled by setting
# tx.phpmyadmin-rule-exclusions-plugin_enabled=0.
#
# Note that a global setting of this variable overrides the setting here.
# That means the "enabled" variable is only set by this rule if it has not
# been set before.
#
# Feel free to set the variable unconditionally here by replacing the
# SecRule line with an unconditional SecAction statement.
#
#SecRule &TX:phpmyadmin-rule-exclusions-plugin_enabled "@eq 0" \
# "id:9513010,\
# phase:1,\
# pass,\
# nolog,\
# setvar:'tx.phpmyadmin-rule-exclusions-plugin_enabled=0'"

0 comments on commit ad2658e

Please sign in to comment.