fix: incorrect set x-amz-date for signV4#2096
Merged
harshavardhana merged 1 commit intominio:masterfrom Apr 18, 2025
Merged
Conversation
fix: incorrect set x-amz-date for signV4
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue with the x-amz-date header used during signature calculation in the StreamingUnsignedV4 flow.
- Changed the timestamp from time.Now().UTC() to a previously defined variable t for consistency in the signature calculation.
Comments suppressed due to low confidence (1)
pkg/signer/request-signature-v4.go:336
- Ensure that the variable t is properly initialized with the correct timestamp before this call to prevent signature mismatches.
return StreamingUnsignedV4(&req, sessionToken, req.ContentLength, t)
harshavardhana
approved these changes
Apr 18, 2025
klauspost
approved these changes
Apr 18, 2025
aminueza
added a commit
to aminueza/terraform-provider-minio
that referenced
this pull request
Mar 10, 2026
- Extract -1 magic number into emptyFilterSentinel constant with doc comment explaining the workaround and linking upstream issue - Add TODO to remove once minio/minio-go#2096 is fixed - Tighten tag test assertion to verify full <Filter><And>...</And></Filter> structure instead of just "<And>" substring - Add sentinel leak guard: every test case now asserts ObjectSizeGreaterThan never appears in the XML output - Add TestEmptyFilterSentinelNotAppliedToNonEmptyFilter to verify the sentinel is only injected for genuinely empty filters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: incorrect set x-amz-date for signV4
if not,minio will check signature with incorrect time