-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat: Support OC-Checksum in bulk upload #51729
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
Conversation
provokateurin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhm we do actually validate the checksum? I thought we simply accepted the checksum as is and only the Desktop client is verifying it when downloading a file.
Please link where this happens for other uploads, I'd be interested to know!
Anyway I don't think we should really do this, as this can easily turn into a DOS if a user uploads a very big file.
mgallien
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you also need to remove those lines https://github.com/nextcloud/server/pull/51729/files#diff-5f5684fb699f86734d9aa4fd1cba195ada4b5635b29b9c82822bec2bc78692b7R190-R192
We usually don't, but in the case of bulk upload where the request is manually forged and parsed, it feels safer to do it.
This is bulk upload, so only small files are transferred. |
95780b3 to
bad7319
Compare
85dc4c3 to
9926567
Compare
But there could be a lot of small files in a bulk upload, leading to the same DOS situation. |
As of now, it's not reported as an issue, so I think we should keep it. It makes parsing much more reliable, and hash computing is cheap enough. |
mgallien
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need a change in the capabilities or clients musk keep sending the header for compatibility with older server releases
I was thinking, the desktop client drops the old header in the next release, and once the current desktop client version is out of support, we drop it server side. Does it address your concern? |
we discussed it and reached the conclusion that the client needs to check the version of the server to figure out when to send the former header |
server before 32.0.0 release expects a custom header with an MD5 checksum during bulk upload the header name is: X-File-MD5 see nextcloud/server#51729 Signed-off-by: Matthieu Gallien <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
server before 32.0.0 release expects a custom header with an MD5 checksum during bulk upload the header name is: X-File-MD5 see nextcloud/server#51729 Signed-off-by: Matthieu Gallien <[email protected]>
mgallien
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works fine
sorry for the noise
you may want to have a better commit message
the current one seems unrelated to the commit content
9926567 to
1e8227d
Compare
To align with the rest of Nextcloud. Signed-off-by: Louis Chemineau <[email protected]>
462442b to
3bb2a92
Compare
|
@mgallien please approve if this works for the desktop client :). |
server before 32.0.0 release expects a custom header with an MD5 checksum during bulk upload the header name is: X-File-MD5 see nextcloud/server#51729 Signed-off-by: Matthieu Gallien <[email protected]>
server before 32.0.0 release expects a custom header with an MD5 checksum during bulk upload the header name is: X-File-MD5 see nextcloud/server#51729 Signed-off-by: Matthieu Gallien <[email protected]>
server before 32.0.0 release expects a custom header with an MD5 checksum during bulk upload the header name is: X-File-MD5 see nextcloud/server#51729 Signed-off-by: Matthieu Gallien <[email protected]>
server before 32.0.0 release expects a custom header with an MD5 checksum during bulk upload the header name is: X-File-MD5 see nextcloud/server#51729 Signed-off-by: Matthieu Gallien <[email protected]>
To align with the rest of Nextcloud.