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

Download user's directory&files as zip while missing fileid is called by URLlink. #17004

Closed
ynott opened this issue Jun 18, 2015 · 6 comments
Closed
Assignees

Comments

@ynott
Copy link

ynott commented Jun 18, 2015

Steps to reproduce

  1. external storage(S3,CIFS Server,etc) mount to ownCloud.
  2. make a url link for sharing.
  3. shutdown the external storage server.
  4. run the file:scan.
  5. boot the external stoarge server.
  6. run the file:scan again ( lost fileid from Database! this fileid is associated shared URL link.)
  7. access the url link and click download button.
  8. user's all files,directory are download(include external storage mounted).

Expected behaviour

Return file not found.

Actual behaviour

get user's all folder and files as Zip.

Server configuration

Operating system: CentOS 6.5

Web server: Apache 2.2

Database: MySQL 5.6.23

PHP version: 5.4.37

ownCloud version: 8.0

@ynott
Copy link
Author

ynott commented Jun 18, 2015

Similar problem.
Download directory as zip while an inner file is being overwritten causes the download to be corrupted
#16960

@ynott ynott closed this as completed Jun 18, 2015
@ynott ynott reopened this Jun 18, 2015
@ynott
Copy link
Author

ynott commented Jun 18, 2015

Sorry, missing close.
reopened.

@ynott
Copy link
Author

ynott commented Jun 18, 2015

https://github.com/owncloud/core/blob/master/apps/files_sharing/lib/controllers/sharecontroller.php#L258

If self::getPath($token) has returned a string ""
$originalSharePath = "";
and then go through to
https://github.com/owncloud/core/blob/master/apps/files_sharing/lib/controllers/sharecontroller.php#L298
All user's files and directory download.

@LukasReschke
Copy link
Member

Are you on 8.0.3? - If not: Update.

@PVince81
Copy link
Contributor

I guess this ticket is more about error handling for zip files.
When building zip files, if something goes wrong in the middle then one would get a corrupt file, or incomplete zip files.

This might not be solvable as files are streamed into the zip file on the fly, unless we can have some kind of integrity check before that. (ex: can file be decrypted in case of encryption ? is file properly readable ?)

@ynott
Copy link
Author

ynott commented Jun 19, 2015

@LukasReschke
I updated to 8.0.4 , this problem did not occur. thanks a lot!
@PVince81
Yes,zip file error occur, but I focus not to be download.

Thanks for solving my issue.

@ynott ynott closed this as completed Jun 19, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Aug 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants