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

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

Merged
merged 3 commits into from
Sep 1, 2020

Conversation

juliusknorr
Copy link
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?

@juliusknorr juliusknorr added bug 3. to review Waiting for reviews labels Aug 1, 2019
nickvergessen
nickvergessen previously approved these changes Sep 9, 2019
@rullzer
Copy link
Member

rullzer commented Sep 10, 2019

@icewind1991 I'd like your take on this.

@rullzer rullzer added this to the Nextcloud 18 milestone Sep 10, 2019
@icewind1991
Copy link
Member

remove the check for empty getUnjailedPath

This was referenced Dec 11, 2019
@ChristophWurst ChristophWurst force-pushed the bugfix/external-reshare branch from d5f19c1 to fdf63bc Compare December 13, 2019 11:24
@ChristophWurst
Copy link
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 review December 13, 2019 11:25

patch changed fundamentally

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

rullzer commented Jan 7, 2020

@juliushaertl kill or redo?

@rullzer rullzer mentioned this pull request Apr 4, 2020
80 tasks
@juliusknorr juliusknorr modified the milestones: Nextcloud 19, Nextcloud 20 Apr 9, 2020
@MorrisJobke MorrisJobke mentioned this pull request Aug 11, 2020
57 tasks
@rullzer
Copy link
Member

rullzer commented Aug 11, 2020

let me rebase...

@rullzer rullzer force-pushed the bugfix/external-reshare branch from fdf63bc to 9c4c786 Compare August 11, 2020 18:44
@MorrisJobke
Copy link
Member

@icewind1991 🏓

@rullzer rullzer mentioned this pull request Aug 21, 2020
19 tasks
@rullzer rullzer mentioned this pull request Aug 27, 2020
21 tasks
juliusknorr and 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 icewind1991 force-pushed the bugfix/external-reshare branch from 9c4c786 to 2879472 Compare August 28, 2020 09:15
@faily-bot
Copy link

faily-bot bot commented Aug 28, 2020

🤖 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
Member

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

@rullzer
Copy link
Member

rullzer commented Aug 28, 2020

@icewind1991 +1 then?

@rullzer rullzer merged commit e0d767d into master Sep 1, 2020
@rullzer rullzer deleted the bugfix/external-reshare branch September 1, 2020 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Federated shares reshared with local users are not accessible
6 participants