(SSE compatibility) Fix SSE files being mistaken for E2EE
Based on my observations, I'm pretty sure to have found a somewhat reliable way to tell SSE and E2EE files apart, however i do not know if this is 100% reliable. I've tested this fix a bit and it seems like it's working fine.
What I've learned is, that with SSE, a folder will never be marked as encrypted in the filecache. With E2EE a file can only be E2EE if it's inside an E2EE folder. So, if a folder is marked as encrypted, it and all of its contents have to be E2EE.
Based on that, its fairly easy to check if a file/folder is SSE or E2EE: If a node has any parent marked as encrypted, it is E2EE. If that node however has no parent marked as encrypted but the node itself is, it is SSE.
I know this plugin is not compatible with SSE, however i still did this fix to at least increase compatibility (also, i have E2EE alongside with SSE and i do not want to disable either, so yeah this is the outcome). This also addresses #489.
Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
We hope that the reviewing process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR reviewing process.
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
Thank you for contributing to Nextcloud and we hope to hear from you soon!
so, i've tested it on my own installation since i made this PR, and so far everything just works fine. i didn't encounter any issues. i think i successfully made E2EE and SSE compatible
Makes sense, thanks. I left some minor code style comments :)
thanks! :) do i just accept the suggestions via the github web ui? like clicking "sign off and commit suggestion"? so adding 3 commits? sorry never did such a code review ^^"
do i just accept the suggestions via the github web ui? like clicking "sign off and commit suggestion"? so adding 3 commits?
I would recommend doing it locally. There are other places where you use spaces instead of spaces that should be updated too.
alright, done!
Looks good @fluse1367 :).
Looks like there is a conflict with master in E2EEnabledPathCache. Can you fix it?
done @artonge :)
@fluse1367 some unit tests are failing due to your changes. Can you take a look?
Closing in favor of https://github.com/nextcloud/end_to_end_encryption/pull/593 due to inactivity
hey @artonge, sorry for not answering :( thanks for taking over ❤️ happy to see the changes merged :D
hey @artonge, sorry for not answering :( thanks for taking over ❤️ happy to see the changes merged :D
Thanks for your investigation and work :)