-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Make minio package support legacy MD5 checksum #23768
Conversation
Should we make that configurable? That setting feels like "legacy" and may prevent working with newer services. |
I feel that it won't break newer services because it seems that newer services should have the ability to handle such behavior. And I haven't got a clear idea about how to configure the minio behavior clearly, for example, there are a lot of options. If you really prefer to introduce a new option, what's the possible/suitable name for it in your mind? |
Co-authored-by: Yarden Shoham <git@yardenshoham.com>
eac88bc
to
846284c
Compare
Even if MinIO package gets fixed, it doesn't guarantee that other packages never have similar behaviors. The root problem is that Gitea's |
Here is the code which drops the error btw: https://github.com/minio/minio-go/blob/f54fa21d32c040f6b33ac949b72c58bcea5d0669/utils.go#L389-L422 |
Codecov Report
@@ Coverage Diff @@
## main #23768 +/- ##
==========================================
- Coverage 47.14% 47.11% -0.03%
==========================================
Files 1149 1155 +6
Lines 151446 152517 +1071
==========================================
+ Hits 71397 71863 +466
- Misses 71611 72178 +567
- Partials 8438 8476 +38
... and 48 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Thank you so much! This was the missing piece for me to migrate my projects to Gitea! 🥳 |
A feedback from discord: https://discord.com/channels/322538954119184384/561007778139734027/1090185427115319386 Some storages like: * https://developers.cloudflare.com/r2/api/s3/api/ * https://www.backblaze.com/b2/docs/s3_compatible_api.html They do not support "x-amz-checksum-algorithm" header But minio recently uses that header with CRC32C by default. So we have to tell minio to use legacy MD5 checksum. I guess this needs to be backported because IIRC we 1.19 and 1.20 are using similar minio package. The minio package code for SendContentMD5 looks like this: <details> <img width="755" alt="image" src="https://user-images.githubusercontent.com/2114189/228186768-4f2f6f67-62b9-4aee-9251-5af714ad9674.png"> </details> # Conflicts: # custom/conf/app.example.ini # tests/pgsql.ini.tmpl
Backport #23768 (no source code conflict, only some unrelated docs/test-ini conflicts) Some storages like: * https://developers.cloudflare.com/r2/api/s3/api/ * https://www.backblaze.com/b2/docs/s3_compatible_api.html They do not support "x-amz-checksum-algorithm" header But minio recently uses that header with CRC32C by default. So we have to tell minio to use legacy MD5 checksum.
* upstream/main: Refactor internal API for git commands, use meaningful messages instead of "Internal Server Error" (go-gitea#23687) Add CSS rules for basic colored labels (go-gitea#23774) Add meilisearch support (go-gitea#23136) Add missing translation for `actions.runners.reset_registration_token_success` (go-gitea#23732) [skip ci] Updated translations via Crowdin Implement Issue Config (go-gitea#20956) Set repository link based on the url in package.json for npm packages (go-gitea#20379) Add API to manage issue dependencies (go-gitea#17935) Add creation time in tag list page (go-gitea#23693) Make minio package support legacy MD5 checksum (go-gitea#23768) Yarden Shoham has a new email address (go-gitea#23767) fix br display for packages curls (go-gitea#23737)
A feedback from discord: https://discord.com/channels/322538954119184384/561007778139734027/1090185427115319386
Some storages like:
They do not support "x-amz-checksum-algorithm" header
But minio recently uses that header with CRC32C by default. So we have to tell minio to use legacy MD5 checksum.
I guess this needs to be backported because IIRC we 1.19 and 1.20 are using similar minio package.
The minio package code for SendContentMD5 looks like this: