Skip to content

Fix #1097 Nextcloud while using Nextcloud Memories App (crowdsecurity/http-crawl-non_statics) #1681

Open
florianwgnr wants to merge 2 commits intocrowdsecurity:masterfrom
florianwgnr:patch-3
Open

Fix #1097 Nextcloud while using Nextcloud Memories App (crowdsecurity/http-crawl-non_statics) #1681
florianwgnr wants to merge 2 commits intocrowdsecurity:masterfrom
florianwgnr:patch-3

Conversation

@florianwgnr
Copy link
Contributor

@florianwgnr florianwgnr commented Feb 11, 2026

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

  • I have read the contributing guide
  • I have tested my changes locally
  • For new parsers or scenarios, tests have been added
  • I have run the hub linter and no issues were reported (see contributing guide)
  • Automated tests are passing
  • AI was used to generate any/all content of this PR

Fixes crowdsecurity#1097 False Positive: Nextcloud while using Nextcloud Memories App (crowdsecurity/http-crawl-non_statics)
- 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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ?

Copy link
Contributor Author

@florianwgnr florianwgnr Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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]+

Copy link

@aguswidiyanto0885-lgtm aguswidiyanto0885-lgtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Visual list opening

Copy link

@aguswidiyanto0885-lgtm aguswidiyanto0885-lgtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Over action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False Positive: Nextcloud while using Nextcloud Memories App (crowdsecurity/http-crawl-non_statics)

3 participants