-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Check trashbin perms before moving to trash #29820
Conversation
Codecov Report
@@ Coverage Diff @@
## master #29820 +/- ##
============================================
+ Coverage 58.21% 58.27% +0.05%
- Complexity 18517 18522 +5
============================================
Files 1095 1095
Lines 63715 63722 +7
============================================
+ Hits 37093 37135 +42
+ Misses 26622 26587 -35
Continue to review full report at Codecov.
|
decision clarified and we agreed on the approach: need to update unit tests |
2630d03
to
8d5ad06
Compare
Unit test added. Needs review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Grrrr... Oracle
|
I did some debugging with MariaDB and I can see that the However the output with Oracle seems to imply that the check is done on "/recipient_xyz/files" instead, which disallows anything else than read. |
The "ReadOnlyJail" is initialized before first-login directory structure creation, so it need to allow "/files" creation. |
@IljaN thanks for the info. Seems I'll need to boot up an Oracle docker to solve this mystery. |
When running tests on Oracle: the individual test file works, but when running all the tests, some kind of side effect is causing the issue above. |
Debug comparison: Maybe the read-only wrapper kicks in much earlier with Oracle, could be scan time (when?!) and reads the already masked value. |
I checked the database and both Oracle and MariaDB have the same "permissions" value. However the |
Remember that Oracle consider empty strings as null. I didn't yet reach the correct code but I suspect that there is a check against empty string somewhere that might not kick in when null. I remember @IljaN saying that the permissions on the root was more permissive than on "/files". Let me fix that in the Cache and convert null to empty string... I'm sure this will somewhat solve a lot of other yet undiscovered Oracle problems... |
@PVince81 The root folder is indeed more permissive because for example cache, avatars directories needs to be created in there. |
Confirmed, it works with this fix c30c8ec |
Please do review my last commit. I think it looks alright. |
Check whether the target trashbin is writable (ex: guests). In the case where a guest deletes a file as recipient, the owner would get a copy in their trash. The logic here will detect that the guests' trashbin is not writeable so it will fall back to simply moving directly to the owner's trashbin.
@ownclouders rebase |
Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently |
c30c8ec
to
c7caea2
Compare
Automated rebase with GitMate.io was successful! 🎉 |
stable10: #30224 |
I missed the trash commit, backported here: #30240 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Check whether the target trashbin is writable (ex: guests).
In the case where a guest deletes a file as recipient, the owner would
get a copy in their trash. The logic here will detect that the guests'
trashbin is not writeable so it will fall back to simply moving directly
to the owner's trashbin.
Related Issue
owncloud/guests#31 approach 1
Motivation and Context
How Has This Been Tested?
Manually tested.
Screenshots (if appropriate):
Types of changes
Checklist:
TODOs: