coreruleset / nextcloud-rule-exclusions-plugin

Rule exclusion plugin for Nextcloud
Apache License 2.0
11 stars 7 forks source link

fix: file uploads FP from Windows client #47

Closed EsadCetiner closed 8 months ago

EsadCetiner commented 8 months ago

closes #46

EsadCetiner commented 8 months ago

@mhastu the uri path you provided in your issue should match, is a different uri path not matching? https://regexr.com/7q35l

or is the if header is sent twice?

I'll change the regex to \.file$ at the end if your sure that all requests end with that, it just seems a bit strange

mhastu commented 8 months ago

Apologies, I misread the regex and didn't notice that [a-z0-9\.]+ will match .file. And you're right, there's no need to be overly restrictive with the ending. But in that case, I would handle it like the username and change [a-z0-9\.] to [^/], so it can match any filename.

EsadCetiner commented 8 months ago

but have you actually seen requests to remote.php/dav/uploads/ ending in a filename? I'm happy to change the regex to check if it's ending in .file or to a negated set [^/]+ if it's a filename.

mhastu commented 8 months ago

No, all the requests of FPs on my system ended in .file.

EsadCetiner commented 8 months ago

ok, thank you!

If you encounter another FP where the request uri doesn't end in .file then let me know and we can improve the regex.