Repository navigation
[stable6] backport share key pattern matching fix - #11560
Conversation
|
I've split the backports to avoid confusion: #11560 will have to be tested and merged first. |
|
I checked the code and there is no suspicious use of Next up: testing |
As owner
As recipient
The failing steps are as follows, with cadaver:
I tried this on stable7 and it did NOT happen, so it's specific to this backport. |
36654fa to
d671e04
Compare
|
Fixed the problem with moving files with d671e04 |
|
Please do not relaunch Jenkins here to save resources. |
|
I went through many of the cases from #11137 and they all seem to work well here. |
Instead of inaccurate pattern matching, use the list of users who we know have access to the file to build the list of share keys. This covers the following cases: - Move/copy files into a subfolder within a share - Unsharing from a user - Deleting files directlry / moving share keys to trashbin Conflicts: apps/files_encryption/lib/keymanager.php apps/files_encryption/tests/hooks.php apps/files_encryption/tests/keymanager.php apps/files_encryption/tests/trashbin.php
fixFileSize is not needed as the target file will already have the correct unencrypted size after renaming
d671e04 to
9878f00
Compare
|
Rebased onto stable6 with the webdav copy patch in. This PR now only contains the "share key pattern matching" fix. Please review @schiesbn |
|
💣 Test FAILed. 💣 Build result: FAILURE💣 Test FAILed. 💣 |
|
Ah! Test results! Encryption tests fail. |
|
Unit tests fail locally: I'll have a look. |
|
Race condition / side effect... when running only the encryption unit tests it works, but running all the tests make it fail. It sounds familiar. |
|
Some share keys aren't properly cleant up. @schiesbn this is similar to what I observed yestered: Will continue investigating. |
|
@schiesbn this is very strange: the "unlink" operation on a shared file will not only delete the file itself, but also the file cache entry. And only after that comes the I wonder whether this is an already existing bug that has just now been discovered through these new unit tests or whether the backport itself is bringing new bugs... That bug in itself isn't that bad as it would leave stray share keys but no data loss, but still now breaks the unit test. |
|
To debug this, put a breakpoint in "apps/files_encryption/tests/hooks.php" line 252: $result = $this->user2View->unlink($this->filename);As soon as it stops, put another breakpoint here: "apps/files_encryption/lib/keymanager.php" line 444. I'll see whether the bug already exists on stable6. Then we either need to find a stable6 specific fix or adjust the unit tests... |
FileInfo class doesn't exist in stable6
|
The issue indeed exists on stable6 and was just highlighted by the backported unit test... |
|
@karlitschek don't release 6.0.6 without this backport. @craigpg we don't have a tag for that ? I'd have set the milestone to OC 6.0.6. |
|
@PVince81 Sure. Do you have an ETA? |
|
If this is urgent I can hijack the unit tests so that we at least get the important regex part in. How about that ? |
|
💣 Test FAILed. 💣 Build result: FAILUREGitHub pull request #11560 of commit 962b410 automatically merged.Building remotely on vm-slave-02 (SLAVE) in workspace /var/jenkins/workspace/pull-request-analyser-ng-simple@13 > git rev-parse --is-inside-work-tree # timeout=10Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/owncloud/core.git # timeout=10Fetching upstream changes from https://github.com/owncloud/core.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/11560/merge^{commit} # timeout=10Checking out Revision 69a86386f815ee023a0dfa7b2ba4a6afd40494a2 (detached) > git config core.sparsecheckout # timeout=10 > git checkout -f 69a86386f815ee023a0dfa7b2ba4a6afd40494a2 > git rev-list 6f02a7b1b1a59a42361641fb1326096c647cda42 # timeout=10 > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » vm-slave-02Configuration pull-request-analyser-ng-simple » vm-slave-02 is still in the queue: Waiting for next available executor on vm-slave-02pull-request-analyser-ng-simple » vm-slave-02 completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 27 second💣 Test FAILed. 💣 |
stable6 has a bug where the share keys are not properly deleted when deleting a shared file as non-owner. To make sure the more important fix from the backport of 1e63175 can be applied, the corresponding assert introduced by the backport is disabled.
|
A new inspection was created. |
|
Since #11598 is not an easy fix and we don't want to break the RC for a minor issue, I decided to comment out the failing assert so we can move forward with this important backport. @schiesbn can you review the code ? |
|
The inspection completed: 20 new issues, 13 updated code elements |
|
💣 Test FAILed. 💣 Build result: FAILUREGitHub pull request #11560 of commit d63bba3 automatically merged.Building remotely on vm-slave-02 (SLAVE) in workspace /var/jenkins/workspace/pull-request-analyser-ng-simple@4 > git rev-parse --is-inside-work-tree # timeout=10Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/owncloud/core.git # timeout=10Fetching upstream changes from https://github.com/owncloud/core.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/11560/merge^{commit} # timeout=10Checking out Revision c37ebe42efe2574fa2b829aff57528d9e5412a8a (detached) > git config core.sparsecheckout # timeout=10 > git checkout -f c37ebe42efe2574fa2b829aff57528d9e5412a8a > git rev-list db53d25bae4c88051f06d234b47f99bf70aca3cc # timeout=10First time build. Skipping changelog. > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » vm-slave-02pull-request-analyser-ng-simple » vm-slave-02 completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 2 second💣 Test FAILed. 💣 |
|
@owncloud-bot retest this please |
|
💣 Test FAILed. 💣 Build result: FAILUREGitHub pull request #11560 of commit d63bba3 automatically merged.Building remotely on vm-slave-02 (SLAVE) in workspace /var/jenkins/workspace/pull-request-analyser-ng-simple > git rev-parse --is-inside-work-tree # timeout=10Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/owncloud/core.git # timeout=10Fetching upstream changes from https://github.com/owncloud/core.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/11560/merge^{commit} # timeout=10Checking out Revision c37ebe42efe2574fa2b829aff57528d9e5412a8a (detached) > git config core.sparsecheckout # timeout=10 > git checkout -f c37ebe42efe2574fa2b829aff57528d9e5412a8a > git rev-list f595c3a82746ab6ed4aadbe1725fef6be9f27d25 # timeout=10 > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » vm-slave-02pull-request-analyser-ng-simple » vm-slave-02 completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 1 second💣 Test FAILed. 💣 |
|
Maybe we need a bot to restart the bot when it fails ? |
|
@owncloud-bot retest this please |
|
💣 Test FAILed. 💣 Build result: FAILUREGitHub pull request #11560 of commit d63bba3 automatically merged.Building remotely on vm-slave-02 (SLAVE) in workspace /var/jenkins/workspace/pull-request-analyser-ng-simple@8 > git rev-parse --is-inside-work-tree # timeout=10Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/owncloud/core.git # timeout=10Fetching upstream changes from https://github.com/owncloud/core.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/11560/merge^{commit} # timeout=10Checking out Revision 751dc23e130a21a36f0f51b92d10c02f3037ee18 (detached) > git config core.sparsecheckout # timeout=10 > git checkout -f 751dc23e130a21a36f0f51b92d10c02f3037ee18 > git rev-list 79d4c2efe369d10b6a12a7dd227377f73213e585 # timeout=10 > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » vm-slave-02Configuration pull-request-analyser-ng-simple » vm-slave-02 is still in the queue: Waiting for next available executor on vm-slave-02pull-request-analyser-ng-simple » vm-slave-02 completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsDisk usage plugin fails during calculation disk usage of this build.💣 Test FAILed. 💣 |
|
@schiesbn forget Jenkins... the tests should run locally. |
|
code looks good |
|
Thanks. Needs a second reviewer @LukasReschke @icewind1991 |
|
👍 |
…rectbackport [stable6] backport share key pattern matching fix
Backport of
Fixes #11252
@schiesbn the backport of #11137 applies with no major conflicts thanks to the backport of #9897.