Fix #1097 Nextcloud while using Nextcloud Memories App (crowdsecurity/http-crawl-non_statics) #1681
Open
florianwgnr wants to merge 2 commits intocrowdsecurity:masterfrom
Open
Fix #1097 Nextcloud while using Nextcloud Memories App (crowdsecurity/http-crawl-non_statics) #1681florianwgnr wants to merge 2 commits intocrowdsecurity:masterfrom
florianwgnr wants to merge 2 commits intocrowdsecurity:masterfrom
Conversation
Fixes crowdsecurity#1097 False Positive: Nextcloud while using Nextcloud Memories App (crowdsecurity/http-crawl-non_statics)
blotus
reviewed
Feb 17, 2026
| - evt.Meta.http_status == '400' && evt.Meta.http_verb == 'GET' && evt.Meta.http_path contains '/apps/mail/api/messages' #When loading mail messages, the request may return a 400 Bad Request | ||
| - evt.Meta.http_status == '404' && evt.Meta.http_verb == 'GET' && evt.Meta.http_path contains '/apps/richdocumentscode/proxy.php' && evt.Parsed.http_args contains 'req=' #Collabora/richdocumentscode uses proxy.php to access resources, some may 404 if missing No newline at end of file | ||
| - evt.Meta.http_status == '404' && evt.Meta.http_verb == 'GET' && evt.Meta.http_path contains '/apps/richdocumentscode/proxy.php' && evt.Parsed.http_args contains 'req=' #Collabora/richdocumentscode uses proxy.php to access resources, some may 404 if missing | ||
| - evt.Meta.http_status == '200' && ((evt.Meta.http_verb == 'GET' && ((evt.Meta.http_path matches '\\/apps\\/memories\\/api\\/image\\/preview\\/(\\d+)' && evt.Parsed.http_args contains 'x=' && evt.Parsed.http_args contains 'y=') || evt.Meta.http_path matches '\\/apps\\/memories\\/api\\/days\\/[0-9%2C]+')) || (evt.Meta.http_verb == 'POST' && evt.Meta.http_path == '/apps/memories/api/image/multipreview')) # allow Nextcloud Memories (preview, multipreview, days) |
Member
There was a problem hiding this comment.
I'm not sure about the evt.Meta.http_path matches '\\/apps\\/memories\\/api\\/days\\/[0-9%2C]+'.
Because it's in a character class, it will match either %, 2, or C, which I guess is not intended ?
Contributor
Author
There was a problem hiding this comment.
@blotus: the %2C equals a , in URL encoding. Here are my server logs for the nextcloud memories days endpoint that i want to whitelist with the regex above:
0.0.0.0 - - [19/Feb/2026:10:58:10 +0100] "GET /apps/memories/api/days/20484%2C20479%2C20478%2C20477%2C20475%2C20472%2C20455%2C20452%2C20451 HTTP/2.0" 200 4789 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.2 Mobile/15E148 Safari/604.1"
0.0.0.0 - - [19/Feb/2026:10:58:11 +0100] "GET /apps/memories/api/days/20484%2C20479%2C20478%2C20477%2C20475%2C20472%2C20455%2C20452%2C20451 HTTP/2.0" 200 4789 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.2 Mobile/15E148 Safari/604.1"
But you´re right, it could be improved by matching the exact pattern, e.g. \d+%2C instead of [0-9%2C]+
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1097 False Positive: Nextcloud while using Nextcloud Memories App (crowdsecurity/http-crawl-non_statics)
Description
added 3 Nextcloud Memories endpoints to the whitelist
Checklist