Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: overhaul nc files, calendar, and contacts rule exclusions #107

Merged
merged 18 commits into from
Jan 19, 2025

Conversation

EsadCetiner
Copy link
Member

Rule exclusions for the File Manager is currently a mess and a pain to work with, these issues became even more obvious when I started work on fixing issues with the Nextcloud iOS app (The app is currently unusable) and I didn't want to compound the problem. I had to touch some rules for CalDav and CardDav since they both use similar endpoints (remote.php).

Since these changes are fairly big, I tested these changes against older Nextcloud versions and tested this in prod for a while so there shouldn't be any regressions. I added some tests where I could but this isn't an easy part of Nextcloud to add tests for.

Improvements:

  • The lines of code has been reduced by about 250
  • The number of rules has gone down from 184 to 168
  • Rule exclusions for Nextcloud Files are no longer fragmented between File Manager and Nextcloud Files
  • Due to the number of rule exclusions for the File Manager, I've split the rules into 3 subcategories, Settings, Web GUI, and file uploads/downloads.
  • As a consequence of the refactor, a new false positive introduced in the Nextcloud 31 beta has also been fixed.
  • Existing rules should be easier to maintain (Evident by the fix in Nextcloud 31 beta)

Copy link
Contributor

@theseion theseion left a comment

Choose a reason for hiding this comment

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

Good stuff!

README.md Outdated Show resolved Hide resolved
plugins/nextcloud-rule-exclusions-before.conf Show resolved Hide resolved
plugins/nextcloud-rule-exclusions-before.conf Outdated Show resolved Hide resolved
plugins/nextcloud-rule-exclusions-before.conf Outdated Show resolved Hide resolved
plugins/nextcloud-rule-exclusions-before.conf Outdated Show resolved Hide resolved
plugins/nextcloud-rule-exclusions-before.conf Outdated Show resolved Hide resolved
plugins/nextcloud-rule-exclusions-before.conf Outdated Show resolved Hide resolved
plugins/nextcloud-rule-exclusions-before.conf Outdated Show resolved Hide resolved
plugins/nextcloud-rule-exclusions-before.conf Outdated Show resolved Hide resolved
plugins/nextcloud-rule-exclusions-before.conf Outdated Show resolved Hide resolved
@EsadCetiner EsadCetiner merged commit 724f9c2 into coreruleset:main Jan 19, 2025
3 checks passed
@EsadCetiner EsadCetiner deleted the files-refactor branch January 19, 2025 10:32
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.

2 participants