-
Notifications
You must be signed in to change notification settings - Fork 669
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
Checksum Mismatch on Download Must be Handled Gracefully #4638
Comments
Lets disable checksumming completely then. Displaying warnings will do more harm than good, i.e. lead to more bug reports that will wonder why there are warnings, and if they should worry. |
Hm. Yes. Probably true. |
Linking owncloud/core#23783 |
What use is for such a warning? |
As discussed today once again. We just pass around checksums and do no actual checksum verification on the server. Which makes them not very useful. As such it is also somewhat dangerous for the client to rely on them. |
If you don't do checksum verification, then don't pass them around. Period. |
Hello, I would second the above comment: if this checksumming feature is enabled on the client then you should assume that checksums are reliable and re-download automatically. If the checksum problem persists for several retries then this is another problem and should be reported to a user (most likely a bug in the stack somewhere). This would be useful to report to the user. |
It sounds like we need to do something like this:
|
If I understand it right, transmissionChecksum is designed to ensure integrity of message payload. |
@AnrDaemon "Transmission checksums" are the checksums the client sends and receives from the server, "content checksums" are the checksums the client uses to detect changes in local data (never communicated to the server atm), see the doc comment in https://github.com/owncloud/client/blob/master/src/libsync/checksums.cpp for details. |
Ah, k. I confused them with a similarly named feature of HTTP protocol. |
@ckamm IIRC if the transmissionChecksum parameter in the config file is empty or not there, we do not handle any checksums, ie. do no check on it. So I don't think we need a new config param. |
Pull request: #4663 |
What about adding this flag to the server capabilities to discover if they support checksums? In this way you can avoid local config option and always do the best of the server you are talking to... https://github.com/cernbox/smashbox/blob/master/protocol/protocol.md#capabilities-call |
@moscicki That would indeed be nice - I just assumed going down this path was not an option because it'd require a modification to the capabilities the server returns. If it's fine to do that on your end, I'm very much up for it. Suggestion
@rullzer Feel free to chime in if you have comments regarding the capabilities API. |
I would think that if you do not find the capability then you assume the On Wed, Apr 13, 2016 at 10:25 AM, ckamm notifications@github.com wrote:
Best regards, |
@moscicki Yes exactly. You'd need to update your server to return this capability to retain the current behavior of validating checksums on download. |
It should not be hard to return proper capabilities. But we would need to define a very concrete set of options to be returned. However the current server implementation can't provide you this info. As we just store a string (and not even invalidate it at the correct times currently :S). |
@ckamm in general a list as such seems like a good idea. Maybe we should also add the capability if the server checks the checksum etc. |
@rullzer I was assuming that |
Ah that is fine with me as well. |
👍 for server capabilities, but we still have to deal with the old servers which do not send anything in that regards. Then we do not do any checksumming. |
@ckamm: for our system I can set both flags, I don't have a problem with that. However I think "validateDownloads" is a broken concept by design. Owncloud server should not send any checksums if they are not reliable and they should disable sending the checksum headers until they fix it. So this option should disappear with the last broken owncloud php server deployed... |
Okay, let's reevaluate. In the released ownCloud server version 9.0.1, if you enabled That doesn't seem like so much of a problem, because users shouldn't use Can we tell people not to do that? If so, we can drop |
Ah. Okey. In this case we can introduce the checksum capabilty (and drop On Thu, Apr 14, 2016 at 10:21 AM, ckamm notifications@github.com wrote:
Best regards, |
@DeepDiver1975 is there any server release out there that returns checksums at all? |
9.0 will only store the checksums and return them on request, but the check of those checksums will not happen on the server. That is all, what currently is released. |
Please 🙏 answer my question: If I do a GET on a file which has a checksum in the filecache, does any server version add that automatically or not? |
sorry but you should disable serving any checksums which are not checksums On Thu, Apr 14, 2016 at 2:19 PM, Morris Jobke notifications@github.com
Best regards, |
@moscicki yes, of course. But if 9.0.0 by accident returns these checksums we have to react on that in the client, as we know that the checksums are not reliable. Version 9.0.0 is already out and we can not change that any more if people have it installed and do not update. |
yeah, I know. it was more a comment to the server implementation... |
c> In the released ownCloud server version 9.0.1, if you enabled So, server or client? c> it'd send checksums to the server, the server would store them and echo Broken server, can't be helped client side. c> That doesn't seem like so much of a problem, because users shouldn't use This shouldn't be an option at client side, to begin with. c> Can we tell people not to do that? If so, we can drop validateDownloads. Just remove this option from client. It's much worse than client-managed file |
c> Unfortunately, due to owncloud/core#23783, we will have servers that send Since we're discussing new client functionality, you can safely assume, that c> Clearer wording suggestion: I still don't see the need for this. At all. |
@DeepDiver1975 @PVince81 Please answer. |
|
Yes |
Server 9.0 does it. If you send it a checksum it will return that cheksum (not always the right one as we have seen). |
So I think it is good: if you drop the transmissionChecksum in config file in favour of capability call on the server then:
In this way you leave it in hands of the server to sort out correct checksum handling before advertising the capability to you. From a point of view of a client it is not a problem anymore and no need to maintain extra flags such as validateDownloads. |
@moscicki You are right. Ok, lets agree on this change: With 2.2.0, we remove the theming option The only change is required on @moscicki s side: If 2.2.0 is released, you will have to add the entry in your capabilities to continue doing the validation on your site. Also some testing in your setup with a beta would be very appreciated. @DeepDiver1975 @karlitschek @MTRichards do you agree? |
* Add checksums/supportedTypes and checksums/preferredUploadType capabilities. The default is that no checksum types are supported. * Remove the transmissionChecksum config option. Servers must now use the capabilities to indicate that they are fine with the client sending checksums. Note: This intentionally breaks brandings that overrode Theme::transmissionChecksum. The override must be removed and the server's capabilities must be adjusted to include the new values.
c> @AnrDaemon your feedback is appreciated, but I ask you to work on tone of It would help if you read not only my last message, but previous ones too. c> If there's an important bug in a released server version that can be worked It wasn't an attempt to push things around, it was an explanation to the |
@dragotin makes total sense. Thanks! |
This will be ready-to-test once the pull request #4663 is merged. |
Hi hi: Steps Executed
Results At Activity > Not Synced tab a new warning appears with "The downloaded file does not match the checksum. An a retry is launched at any sync, so this part seems to work fine, but there is no overlay icon update that warns this situation as is described at 3735# |
Please note that I have updated the protocol description accordingly: I would appreciate if someone could have a look and cross-check. FYI: @michaelstingl |
doublechecked, looks very reasonable. Thanks @moscicki |
Expected behaviour
If the client detects a mismatch of checksum after download of a file, it must not completely drop the file but only display a warning that the checksums did not match and the file might be corrupted.
Actual behaviour
Because of owncloud/core#23783 we must not handle the checksum mismatch as a hard error. Because the server potentially delivers wrong checksums for files, there will be files where the checksums will not match even for not corrupted download.
Steps to reproduce
Client version 2.2.0 git.
The text was updated successfully, but these errors were encountered: