Enabling nextdloud exclusion --> Expecting an action, got: ctl:requestBodyLimit=1073741824"
See original GitHub issueDescribe the bug
I have a nextcloud install (using modsecurity with the nginx connector), enabled the owasp nextcloud exclusions and everything runs fine - expect uploading big files. So I tried to enable the outcommented, predefined rule in “rules/REQUEST-903.9003-NEXTCLOUD-EXCLUSION-RULES.conf”:
SecRule REQUEST_URI "@endsWith /index.php/apps/files/ajax/upload.php" \
"id:9003610,\
phase:1,\
t:none,\
nolog,\
ctl:requestBodyLimit=1073741824"
Expected behaviour
Big file uploads work
Actual behaviour
Testing the outcommented file results in an error. So running “nginx -t” gives: File: /etc/nginx/modsec/coreruleset-dev/rules/REQUEST-903.9003-NEXTCLOUD-EXCLUSION-RULES.conf. Line: 35. Column: 33. Expecting an action, got: ctl:requestBodyLimit=1073741824"
–> I can’t even enable the exclusion and don’t see why.
Your Environment
- CRS version: current dev branch
- Paranoia level setting: 1
- ModSecurity version: 3.0.4
- Web Server and version: nginx 1.19.10
- Operating System and version: Arch Linux, fully up to date
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Code - GitHub
# The exclusions are only active if crs_exclusions_nextcloud=1 is set. # See rule 900130 in crs-setup.conf.example for instructions. #. # To relax upload ......
Read more >Documents Archives > Page 2 of 13 > Blog-D without Nonsense
Enable verbose tracing type of various fio actions. May be 'all' for all types or ... Note that the maximum length of a...
Read more >Browse PHP Technical Problem Clusters - Code Grepper
Get code examples instantly right from your google search results with the Grepper Chrome Extension.
Read more >pvdisplay帮助文档 - CSDN
方法: tar –cvzf /tmp/root.tar.gz /root --exclude=”file*”. --exckude=”file*” 打包时候排除 file 开头的文件. 软件包管理一般分为两种是 rpm 包和 yum 包。
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@airween Thanks for your help and detailed answers, which helped a lot to understand the underlying problem! I will regularly check the docs you provided and update the config to the better “ctl:requestBodyLimit”-solution, once it’s available. Thanks for the quick support here.
Hi @mathsen,
thanks for the report.
Sorry to say, but looks like you ran into a libmodsecurity3 bug (or rather a deficiency), namely libmodsecurity3 does not support the
ctl:requestBodyLimit
action.First, you can check the (weak) documentation here. As you can see, this action is just in planning state (marked as TBI - I guess it means “to be implemented”).
But you can also check the source: the scanner (it’s a lexical analyzer) can’t recognize this token (
ctl:requestBodyLimit
), because it is not implemented yet. You can also check the list of implemented actions here. (Note: if a token exists in the scanner and the parser, it doesn’t mean that it works as you expect.)Thank you again for your report - it’s a very important feedback for us (it’s a commented rule therefore we did not notice it).
I do not close this issue yet, but appended to the list of our monthly chat agenda. I’m afraid we can’t help you in this issue, but may be we have to do something with that commented rule generally.
Sorry again.