Skip to content

Commit

Permalink
fix: XML parser failing (#35)
Browse files Browse the repository at this point in the history
Only turn on XML parser the content type matches
  • Loading branch information
EsadCetiner authored Sep 20, 2023
1 parent 381381f commit 2d4f3a3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plugins/nextcloud-rule-exclusions-before.conf
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,11 @@ SecRule REQUEST_FILENAME "@rx ^/remote\.php/dav/systemtags(?:-relations)?/" \
t:none,\
nolog,\
ver:'nextcloud-rule-exclusions-plugin/1.0.0',\
ctl:requestBodyProcessor=XML,\
setvar:'tx.allowed_request_content_type=%{tx.allowed_request_content_type} |text/plain|'"
chain"
SecRule REQUEST_HEADERS:Content-Type "@rx ^text/plain(?:\;charset=UTF-8)?$" \
"t:none,\
ctl:requestBodyProcessor=XML,\
setvar:'tx.allowed_request_content_type=%{tx.allowed_request_content_type} |text/plain|'"

# Allow the data type 'application/octet-stream'
SecRule REQUEST_METHOD "@pm PUT MOVE" \
Expand Down

0 comments on commit 2d4f3a3

Please sign in to comment.