[packages/modsecurity-crs-plugin-nextcloud] Up to 1.8.0
arekm
arekm at pld-linux.org
Mon Nov 23 22:52:55 CET 2026
commit e9323a6ec20b1ccbca3a978362193a604a4169b4
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Mon Nov 23 22:44:28 2026 +0100
Up to 1.8.0
Add upstream PR #180: CRS >= 4.31 matches whole |METHOD| entries, and
the plugin's space-separated additions make WebDAV methods score in
911100. The pipe format works on older CRS too.
crs-pipe-format.patch | 35 +++++++++++++++++++++++++++++++++++
modsecurity-crs-plugin-nextcloud.spec | 6 ++++--
2 files changed, 39 insertions(+), 2 deletions(-)
---
diff --git a/modsecurity-crs-plugin-nextcloud.spec b/modsecurity-crs-plugin-nextcloud.spec
index 648ae79..bd94337 100644
--- a/modsecurity-crs-plugin-nextcloud.spec
+++ b/modsecurity-crs-plugin-nextcloud.spec
@@ -6,12 +6,13 @@
Summary: OWASP CRS rule-exclusion plugin for Nextcloud
Summary(pl.UTF-8): Plugin OWASP CRS z wyjątkami reguł dla Nextclouda
Name: modsecurity-crs-plugin-nextcloud
-Version: 1.7.0
+Version: 1.8.0
Release: 1
License: Apache v2.0
Group: Networking/Daemons/HTTP
Source0: https://github.com/coreruleset/%{plugin_name}/archive/v%{version}/%{plugin_name}-%{version}.tar.gz
-# Source0-md5: 542cfbc1405f406bc43d3ba1bb92a890
+# Source0-md5: 4cbc37d8950a276bbfbb20fb4276b99f
+Patch0: crs-pipe-format.patch
URL: https://github.com/coreruleset/nextcloud-rule-exclusions-plugin
%if %{with tests}
# for modsec-rules-check and the CRS chain the plugin is parsed with
@@ -34,6 +35,7 @@ zmniejszający liczbę fałszywych alarmów CRS na instalacjach Nextclouda
%prep
%setup -q -n %{plugin_name}-%{version}
+%patch -P0 -p1
%build
%if %{with tests}
diff --git a/crs-pipe-format.patch b/crs-pipe-format.patch
new file mode 100644
index 0000000..a91ba32
--- /dev/null
+++ b/crs-pipe-format.patch
@@ -0,0 +1,35 @@
+CRS >= 4.31 matches whole |METHOD| entries in 911100; the old space-separated
+list blocks every request. Works on older CRS too.
+https://github.com/coreruleset/nextcloud-rule-exclusions-plugin/pull/180
+
+diff --git a/plugins/nextcloud-rule-exclusions-before.conf b/plugins/nextcloud-rule-exclusions-before.conf
+index 0e984e6..e8d6b5c 100644
+--- a/plugins/nextcloud-rule-exclusions-before.conf
++++ b/plugins/nextcloud-rule-exclusions-before.conf
+@@ -56,7 +56,7 @@ SecRule &TX:allowed_methods "@eq 0" \
+ pass,\
+ nolog,\
+ ver:'nextcloud-rule-exclusions-plugin/1.8.0',\
+- setvar:'tx.allowed_methods=GET HEAD POST OPTIONS'"
++ setvar:'tx.allowed_methods=|GET| |HEAD| |POST| |OPTIONS|'"
+
+
+ # Copy of CRS rule 901162.
+@@ -541,7 +541,7 @@ SecRule REQUEST_FILENAME "@rx /(?:remote\.php|index\.php/|public\.php/|apps/|ocs
+ t:none,\
+ nolog,\
+ ver:'nextcloud-rule-exclusions-plugin/1.8.0',\
+- setvar:'tx.allowed_methods=%{tx.allowed_methods} PUT PATCH CHECKOUT COPY DELETE LOCK MERGE MKACTIVITY MKCALENDAR MKCOL MOVE PROPFIND PROPPATCH SEARCH UNLOCK REPORT TRACE jsonp'"
++ setvar:'tx.allowed_methods=%{tx.allowed_methods} |PUT| |PATCH| |CHECKOUT| |COPY| |DELETE| |LOCK| |MERGE| |MKACTIVITY| |MKCALENDAR| |MKCOL| |MOVE| |PROPFIND| |PROPPATCH| |SEARCH| |UNLOCK| |REPORT| |TRACE| |jsonp|'"
+
+ # Allow CalDav/CarDav clients to scan for CalDav CarDav path
+ # Thunderbird uses PUT method when configured as a CalDav/CardDav
+@@ -553,7 +553,7 @@ SecRule REQUEST_FILENAME "@streq /" \
+ nolog,\
+ ver:'nextcloud-rule-exclusions-plugin/1.8.0',\
+ ctl:ruleRemoveTargetById=921110;REQUEST_BODY,\
+- setvar:'tx.allowed_methods=%{tx.allowed_methods} PUT PROPFIND'"
++ setvar:'tx.allowed_methods=%{tx.allowed_methods} |PUT| |PROPFIND|'"
+
+ # Dav clients frequently set a content type header with an empty request body on multiple endpoints,
+ # resulting in false positives with rule 200002. This rule covers all of the endpoints
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/modsecurity-crs-plugin-nextcloud.git/commitdiff/e9323a6ec20b1ccbca3a978362193a604a4169b4
More information about the pld-cvs-commit
mailing list