-
Notifications
You must be signed in to change notification settings - Fork 668
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
Locally copying a file should cause a COPY not a PUT #5867
Comments
|
Also for server copy detection:
But this algorithm, that query the database, only work if the file would have been there from a previous sync. It would need some tweaking if two identical files are added at the same time. (When should we do the decision to copy? it has to be done in the right order) For which file do we compute the checksum in the update phase? All NEW files? All files whose mtime has changed (currently we do that for eml files only)? Finaly, which hash can we use for that? Is it ok to do that with MD5 or SHA-1? |
You can't ensure file content equality on hash alone. |
@ogoffart What if the decision to COPY instead of PUT was done in the PropagateUpload job? We compute the content checksum of all files we upload in that job anyway. |
About hashes: We currently use |
Is SHA1+filesize good enough? |
It's been 10 years since SHA1 is no longer considered good enough for chryptographic hashes. And a collision was even found earlier this year. https://en.wikipedia.org/wiki/Hash_function_security_summary Ideally we should use SHA-256 or SHA-3, but we don't currently implement these function. Now, maybe we do not need to be cryptographycally secure. However, when we try to implement COPY, we increase the risk. |
This is a follow up of a discussion in #3422.
Currently when you make a copy of a file that is synchronized, the copy will be uploaded from scratch. Instead, the client should send a COPY command to the server. For large files this would save a lot of bandwidth and time.
The duplicate detection should be possible by checking size, hashes and possibly mtime.
This server issue is relevant: owncloud/core#26584
The text was updated successfully, but these errors were encountered: