Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

unable to download multiple files #1436

Open
Trapulo opened this issue Sep 19, 2018 · 3 comments
Open

unable to download multiple files #1436

Trapulo opened this issue Sep 19, 2018 · 3 comments

Comments

@Trapulo
Copy link

Trapulo commented Sep 19, 2018

Hi,
when I try to download multiple files, the Web GUI select them, shows the download button, but nothing happen.
the browser's debug console reports a remote call with this response:

Malformed URL: D://MYLOGIN@/Websites/.............

where MYLOGIN is my users'name, and the path is the right path to the local file (of course, this is running on Windows).

Any idea?

thanks

@achern
Copy link

achern commented Oct 22, 2018

I am encountering the same bug on a new Pydio 8.2.1 install from archive on Windows Server 2012 R2 with IIS 8.5, PHP 7.2.9, and MySQL 8.0. Here is the error message when trying to access a zip download link:

<?xml version="1.0" encoding="UTF-8"?>
<tree >
    <message type="ERROR">Malformed URL: C://user1@/inetpub/wwwroot/pydio/data/files/sintex/folder</message>
</tree>

Looks like the user name is somehow getting into the file path to zip. Other similar reports here:
https://forum.pydio.com/t/downloading-multiple-files/1444
https://forum.pydio.com/t/cannot-download-more-than-one-file-at-same-time/1636

@achern
Copy link

achern commented Oct 22, 2018

I did some debugging and I've narrowed the problem down to this newly added code to check permissions:
245161f#diff-69ba9488ca49cd1d0c1167134a83b8e5R2443

Removing the newly added code makes folder and zip downloading work again.

I'm not familiar enough with pydio internals to figure out what the problem is, but here's a step-by-step trace to help pinpoint the issue (testuser is downloading testfolder from testworkspace):

2444    $topUrl = $selection->currentBaseUrl();                             // $topUrl is 'pydio://testuser@64c49a60024cc3bf8d7e36b24eeb17de'
2445    $realPath = MetaStreamWrapper::getRealFSReference($topUrl);         // $realPath is 'C:\inetpub\wwwroot\pydio\data\testworkspace'
2446    $newNode = new AJXP_Node(str_replace($realPath, $topUrl, $search)); // $search is 'C:/inetpub/wwwroot/pydio/data/testworkspace/testfolder', constructor argument is 'C:/inetpub/wwwroot/pydio/data/testworkspace/testfolder'
2447    $newNode->setUserId($ctx->getUser()->getId());                      // Throws error 'Malformed URL: C://testuser@/inetpub/wwwroot/pydio/data/testworkspace/testfolder'

Seems like maybe the workspace ID isn't making it into the URL.

Edit: took a closer look at it and it seems like the code is supposed to replace the workspace's filesystem path with a pydio workspace URL, but one of the string replace parameters is using Windows path separators while the other is using Linux/Unix ones, causing the replace to fail.

@cdujeu
Copy link
Member

cdujeu commented Oct 23, 2018

Hi @achern thanks for pointing out, we will have a look at that

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants