Skip to content

Set proper root path for single file shares originating from other storages - #16632

Merged
rullzer merged 3 commits into
masterfrom
bugfix/external-reshare
Sep 1, 2020
Merged

Set proper root path for single file shares originating from other storages#16632
rullzer merged 3 commits into
masterfrom
bugfix/external-reshare

Conversation

@juliusknorr

Copy link
Copy Markdown
Member

Fixes#16617

The main issue here seems to be that the SharedStorage assumes an non-empty result of getUnjailedPath in

if ($source = $this->getUnjailedPath($path)) {
which is not given for shares that originate in the root of a mountpoint (like single file federated shares).

I'm not 100% sure this is the right approach, so some input from @icewind1991 or @rullzer would be highly appreciated. 😉 Maybe we could even just obit the if statement checking for the getUnjailedPath not being empty?

nickvergessen
nickvergessen previously approved these changes Sep 9, 2019
@rullzer

Copy link
Copy Markdown
Member

@icewind1991 I'd like your take on this.

@rullzerrullzer added this to the Nextcloud 18 milestone Sep 10, 2019
@icewind1991

Copy link
Copy Markdown
Member

remove the check for empty getUnjailedPath

This was referenced Dec 11, 2019
@ChristophWurst

Copy link
Copy Markdown
Member

remove the check for empty getUnjailedPath

Applied. Please have a look at the new diff as I didn't test this nor have a clue what I just changed 😉

@ChristophWurst
ChristophWurst dismissed nickvergessen’s stale reviewDecember 13, 2019 11:25

patch changed fundamentally

@rullzerrullzer mentioned this pull request Dec 19, 2019
18 tasks
@juliusknorrjuliusknorr added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Dec 19, 2019
This was referenced Dec 27, 2019
@rullzerrullzer modified the milestones: Nextcloud 18, Nextcloud 19Jan 7, 2020
@rullzer

Copy link
Copy Markdown
Member

@juliushaertl kill or redo?

@rullzerrullzer mentioned this pull request Apr 4, 2020
80 tasks
@MorrisJobkeMorrisJobke mentioned this pull request Aug 11, 2020
57 tasks
@rullzer

Copy link
Copy Markdown
Member

let me rebase...

@rullzer
rullzerforce-pushed the bugfix/external-reshare branch from fdf63bc to 9c4c786CompareAugust 11, 2020 18:44
@MorrisJobke

Copy link
Copy Markdown
Member

@icewind1991 🏓

@rullzerrullzer mentioned this pull request Aug 21, 2020
19 tasks
@rullzerrullzer mentioned this pull request Aug 27, 2020
21 tasks
juliusknorrand others added 2 commits August 28, 2020 10:50
…orages
Co-authored-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991
icewind1991force-pushed the bugfix/external-reshare branch from 9c4c786 to 2879472CompareAugust 28, 2020 09:15
@faily-bot

faily-botBot commented Aug 28, 2020

Copy link
Copy Markdown

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 32410: failure

mariadb10.4-php7.3

Show full log
There were 2 warnings:
1) Test\Files\ViewTest::testRenameFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static
2) Test\Files\ViewTest::testCopyFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static
--
There was 1 failure:
1) OCA\Files_Versions\Tests\VersioningTest::testRestoreMovedShare
File content has not changed
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'version 2'
+'version 1'
/drone/src/apps/files_versions/tests/VersioningTest.php:729

acceptance-app-files

  • tests/acceptance/features/app-files.feature:262
Show full log
 Scenario: unmarking a file as favorite causes the file list to be sorted again # /drone/src/tests/acceptance/features/app-files.feature:262
Given I am logged in # LoginPageContext::iAmLoggedIn()
And I create a new folder named "A name alphabetically lower than welcome.txt" # FileListContext::iCreateANewFolderNamed()
And I see that "A name alphabetically lower than welcome.txt" precedes "welcome.txt" in the file list # FileListContext::iSeeThatPrecedesInTheFileList()
And I close the details view # FilesAppContext::iCloseTheDetailsView()
And I see that the details view is closed # FilesAppContext::iSeeThatTheDetailsViewIsClosed()
│ Details view in Files app visibility could not be got
│ Exception message: Element not found with xpath, (//html//*[@id="app-sidebar" or contains(@class, 'app-sidebar')])[1]
│ │ Unable to locate element: {"method":"xpath","selector":"(//html//*[@id=\"app-sidebar\" or contains(@class, 'app-sidebar')])[1]"}
│ For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
│ Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
│ System info: host: '5491c924bce5', ip: '192.168.208.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-76-generic', java.version: '1.8.0_91'
│ Driver info: driver.version: unknown
│ Trying again
│ And I mark "welcome.txt" as favorite # FileListContext::iMarkAsFavorite()
And I see that "welcome.txt" is marked as favorite # FileListContext::iSeeThatIsMarkedAsFavorite()
And I see that "welcome.txt" precedes "A name alphabetically lower than welcome.txt" in the file list # FileListContext::iSeeThatPrecedesInTheFileList()
When I unmark "welcome.txt" as favorite # FileListContext::iUnmarkAsFavorite()
Then I see that "welcome.txt" is not marked as favorite # FileListContext::iSeeThatIsNotMarkedAsFavorite()
Not favorited state icon for file welcome.txt in file list could not be found after 100 seconds (NoSuchElementException)
And I see that "A name alphabetically lower than welcome.txt" precedes "welcome.txt" in the file list # FileListContext::iSeeThatPrecedesInTheFileList()

Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991

Copy link
Copy Markdown
Member

fixed the test and removed the if statement that isn't relevant anyway

@rullzer

Copy link
Copy Markdown
Member

@icewind1991 +1 then?

@rullzer
rullzer merged commit e0d767d into masterSep 1, 2020
@rullzer
rullzer deleted the bugfix/external-reshare branch September 1, 2020 06:48
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developingWork in progressbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Federated shares reshared with local users are not accessible

6 participants

@juliusknorr@rullzer@icewind1991@ChristophWurst@MorrisJobke@nickvergessen