Files are downloaded as a file without extension

Hi,
Faced such a problem that when downloading all files from an account, they are downloaded as one file, but only it is called the “zip” extension and cannot be opened by users until they rename it, for example, to “download.zip”.
Owncloud version 10.8.0.

изображение

Maybe there is some configuration file where I can fix this?

UPD
CPU: 4 core, 2.7GHz per core
RAM: 16 Gb
ROM: SSD 1Tb

ssl_access_log where i refresh page and Download all files
172.24.173.2 - - [02/Sep/2021:14:53:19 +0300] “GET /index.php/apps/files/?dir=/&fileid=3 HTTP/1.1” 303 -
172.24.173.2 - - [02/Sep/2021:14:53:19 +0300] “GET /index.php/apps/files/?dir=/ HTTP/1.1” 200 32521
172.24.173.2 - - [02/Sep/2021:14:53:19 +0300] “GET /index.php/core/js/oc.js?v=492c005f5bf52ce91b9dec665dc0d330 HTTP/1.1” 200 6648
172.24.173.2 - - [02/Sep/2021:14:53:20 +0300] “GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1” 200 108
172.24.173.2 - - [02/Sep/2021:14:53:20 +0300] “PROPFIND /remote.php/dav/files/admin/ HTTP/1.1” 207 6915
172.24.173.2 - - [02/Sep/2021:14:53:20 +0300] “GET /index.php/avatar/admin/28 HTTP/1.1” 200 32
172.24.173.2 - - [02/Sep/2021:14:53:20 +0300] “GET /index.php/apps/files/ajax/getstoragestats.php?dir=%2F HTTP/1.1” 200 273
172.24.173.2 - - [02/Sep/2021:14:53:20 +0300] “GET /remote.php/dav/files/admin/!%D0%94%D0%BB%D1%8F%20%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B8%20%D0%B2%D1%81%D0%B5%D0%B
3%D0%BE%20%D0%BA%D0%BE%D0%BC%D0%BF%D0%BB%D0%B5%D0%BA%D1%82%D0%B0%20%D0%B0%D0%B1%D0%BE%D0%BD%D0%B5%D0%BD%D1%82%D0%B0%2C%20%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D1%82%D0%BE%D1%87%D0%BD%D0%BE
%20%D0%BF%D0%BE%D1%81%D0%BB%D0%B5%20%D1%81%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F%20%D0%B7%D0%B0%D0%BF%D1%83%D1%81%D1%82%D0%B8%D1%82%D1%8C%20install_pass.bat%20%28ins
tall_bign.bat%29.txt.txt?c=6ed730add98cb09189ee7e6abc65c872&x=32&y=32&forceIcon=0&preview=1 HTTP/1.1” 200 736
172.24.173.2 - - [02/Sep/2021:14:53:20 +0300] “GET /index.php/avatar/admin/28 HTTP/1.1” 200 32
172.24.173.12 - - [02/Sep/2021:14:53:24 +0300] “GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1” 200 108
172.24.173.2 - - [02/Sep/2021:14:53:34 +0300] “GET /index.php/apps/files/ajax/download.php?dir=%2F&files=&downloadStartSecret=h8elaiwb7r HTTP/1.1” 200 100911308

I also noticed that if I select 3 or 4 files, but not all, then “download.zip” is downloaded. But as soon as I put a check mark to select all files, then only “zip” is downloaded.

Please, send ur more information about your environment, and send the server logs as well.

Erwin

1 Like

Erwin, can you help me?

@epalma I’d suggest not to generically ask for “environment” and “logs”, which is in lots of cases not certain to the OP what exactly to do. Keep the issue in mind and ask more specific

@Bugorka as for all issues we need to reproduce what is happening. So please tell us your operating system (+version), the browser (+version) you were using. Additionally clear your owncloud.log, then try again to download a single file and open owncloud.log again. If there are some lines containing the word “Exception” please post this as well.

1 Like

Hello,
OS - CentOS Linux release 7.9.2009 (Core)
Owncloud - 10.8.0.4 (stable)
Browsers - Google Chrome v.93.0.4577.63 (64bit) and Firefox 92.0 (64bit)

I tried to download one file, but the line in owncloud.log with the word “Exception” did not appear.

thank you for the additional information, I didn’t understand what you meant with “downloading all files from an account” in the first place. Your issue is reproducible.

If this prevents users from opening the downloaded file on some operating systems, I consider this as bug too. For your convenience, I filed an issue at

@epalma since you are from ownCloud support, can you provide some workaround for @Bugorka ?

Hi,
Thank you for opening the issue, I saw in the description that you also reproduced this problem and made sure of it yourself.

I would like to ask you to remove the last line from my ssl_access_log, which I posted above. The possibility of editing on my part is already closed.

Thank you for submitting the issue.

We found the code path and fixed it.
The fix will come with Version 10.9

1 Like

Unfortunately I do not have permissions to edit other users’ posts, but I think your ssl_access_log - which is merely a webserver log - does not contain any security relevant information anyway.

Thank you for the prompt solution of the problem. I looked at what changed in the commit and registered it manually in the download.php file, rebooted Apache and everything worked out!

2 Likes

Hello,
Didn’t notice the problem right away. Now the user has noticed that when all files are selected, an archive named download.zip is generated and downloaded, but empty inside. If you select not all files again, then the archive is not empty.
I copied a piece of code that your developers added from GitHub and pasted it into a file at /var/www/html/owncloud/apps/files/ajax/download.php.
The software versions have not changed during this time. Thanks!

1 Like

Thank you for supply your issue, found the path, will supply a fix ASAP

Thank you, please let me know so that I can change the code right away in the application.

1 Like

@Bugorka ongoing progress is here: https://github.com/owncloud/core/pull/39239

2 Likes

Thank you very much, now everything works!